Skip to content

Instantly share code, notes, and snippets.

@theredpea
Created March 3, 2014 19:19
Show Gist options
  • Save theredpea/9332542 to your computer and use it in GitHub Desktop.
Save theredpea/9332542 to your computer and use it in GitHub Desktop.
#Bandwidth-Delay Product
#AKA "data in flight"
#https://d396qusza40orc.cloudfront.net/comnetworks/lect%2F2-1-physical-overview-ink.pdf
import metric
def bandwidthDelay(rate=0.00 * metric.Mbps, propDelay = (0.00 * metric.ms), unit=metric.byte):
return ((float(rate) * propDelay) / unit)
print(bandwidthDelay(5*metric.Mbps, 4 * metric.ms))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment