예제 #1
0
파일: roundtrip.go 프로젝트: hashken/GoDCCP
// RoundtripSample converts a roundtrip time in nanosecond to a floating-point time in milliseconds
func RoundtripSample(series string, rtt int64) dccp.Sample {
	return dccp.NewSample(series, float64(rtt)/1e6, "ms")
}
예제 #2
0
파일: loss.go 프로젝트: niltonkummer/GoDCCP
// LossSample generates a log sample with loss information
func LossSample(series string, lossRateInv uint32) dccp.Sample {
	return dccp.NewSample(series, 100/float64(lossRateInv), "%")
}