HTTP load generator, ApacheBench (ab) replacement
Go
histogram: calculate lengths using round-to-nearest
Sina Siadate30f468b50f6
diff --git a/requester/print.go b/requester/print.goindex 3e9af38..3d2d521 100644--- a/requester/print.go+++ b/requester/print.go@@ -194,7 +194,7 @@ func (r *report) printHistogram() {// Normalize bar lengths.var barLen intif max > 0 {- barLen = counts[i] * 40 / max+ barLen = (counts[i]*40 + max/2) / max}fmt.Printf(" %4.3f [%v]\t|%v\n", buckets[i], counts[i], strings.Repeat(barChar, barLen))}