From 6cf8a45255dba4a050776d50ef9724ae183b2572 Mon Sep 17 00:00:00 2001 From: Abuchi Obiegbu Date: Tue, 18 Jul 2023 11:27:06 -0500 Subject: [PATCH] Fixed reporting of hey to Summary report for latency, initial solution was based on 1million transaction. Hence when transaction exceeds the 1million ma rk, it reports incorrect report. --- requester/report.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/requester/report.go b/requester/report.go index d281054c..dd79fd34 100644 --- a/requester/report.go +++ b/requester/report.go @@ -116,12 +116,12 @@ func runReporter(r *report) { func (r *report) finalize(total time.Duration) { r.total = total r.rps = float64(r.numRes) / r.total.Seconds() - r.average = r.avgTotal / float64(len(r.lats)) - r.avgConn = r.avgConn / float64(len(r.lats)) - r.avgDelay = r.avgDelay / float64(len(r.lats)) - r.avgDNS = r.avgDNS / float64(len(r.lats)) - r.avgReq = r.avgReq / float64(len(r.lats)) - r.avgRes = r.avgRes / float64(len(r.lats)) + r.average = r.avgTotal / float64(r.numRes) + r.avgConn = r.avgConn / float64(r.numRes) + r.avgDelay = r.avgDelay / float64(r.numRes) + r.avgDNS = r.avgDNS / float64(r.numRes) + r.avgReq = r.avgReq / float64(r.numRes) + r.avgRes = r.avgRes / float64(r.numRes) r.print() } @@ -321,3 +321,4 @@ type Bucket struct { Count int Frequency float64 } +