HTTP load generator, ApacheBench (ab) replacement
Go
Replace sharp bars with solid bars.
Burcu Doganaf5a3e3feeda
diff --git a/README.md b/README.mdindex 4b78e40..16059b3 100644--- a/README.md+++ b/README.md@@ -47,17 +47,17 @@ This is what happens when you run boom:Speed index: HahahahaResponse time histogram:- 0.987 [1] |- 1.188 [2] |- 1.389 [3] |- 1.590 [18] |##- 1.790 [85] |###########- 1.991 [244] |################################- 2.192 [284] |#####################################- 2.393 [304] |########################################- 2.594 [50] |######- 2.795 [5] |- 2.996 [4] |+ 0.987 [1] |+ 1.188 [2] |+ 1.389 [3] |+ 1.590 [18] |██+ 1.790 [85] |███████████+ 1.991 [244] |████████████████████████████████+ 2.192 [284] |█████████████████████████████████████+ 2.393 [304] |████████████████████████████████████████+ 2.594 [50] |██████+ 2.795 [5] |+ 2.996 [4] |Latency distribution:10% in 1.7607 secs.diff --git a/commands/print.go b/commands/print.goindex 6153358..0722c64 100644--- a/commands/print.go+++ b/commands/print.go@@ -21,6 +21,10 @@ import ("time")+const (+ barChar = "█"+)+func (r *report) update(res *result) {r.lats = append(r.lats, res.duration.Seconds())r.statusCodeDist[res.statusCode]++@@ -102,7 +106,7 @@ func (r *report) printHistogram() {if max > 0 {barLen = counts[i] * 40 / max}- fmt.Printf(" %4.3f [%v]\t|%v\n", buckets[i], counts[i], strings.Repeat("#", barLen))+ fmt.Printf(" %4.3f [%v]\t|%v\n", buckets[i], counts[i], strings.Repeat(barChar, barLen))}}