in e2e-examples/echo/echo-client/main.go [26:45]
func printRsts(numRpcs int, rspSize int, reqSize int, rsts []int) {
sort.Ints(rsts)
n := len(rsts)
sum := 0
for _, r := range rsts {
sum += r
}
log.Printf(
"\n[Number of RPCs: %v, Request size: %vKB, Response size: %vKB]\n"+
"\t\tAvg\tMin\tp50\tp90\tp99\tMax\n"+
"Time(ms)\t%v\t%v\t%v\t%v\t%v\t%v\n",
numRpcs, reqSize, rspSize,
sum/n,
rsts[0],
rsts[int(float64(n)*0.5)],
rsts[int(float64(n)*0.9)],
rsts[int(float64(n)*0.99)],
rsts[n-1],
)
}