fix: improve RPS accuracy

This commit is contained in:
buyuxiang
2022-05-09 22:05:35 +08:00
parent 6b8b056447
commit 203ae20e2c
5 changed files with 24 additions and 32 deletions
+1 -2
View File
@@ -11,7 +11,6 @@ import (
"time"
"github.com/olekukonko/tablewriter"
"github.com/rs/zerolog/log"
)
@@ -154,7 +153,7 @@ func (r *runner) reportTestResult() {
if err != nil {
return
}
duration := time.Duration(entryTotalOutput.LastRequestTimestamp-entryTotalOutput.StartTime) * time.Second
duration := time.Duration(entryTotalOutput.LastRequestTimestamp-entryTotalOutput.StartTime) * time.Millisecond
currentTime := time.Now()
println(fmt.Sprint("=========================================== Statistics Summary =========================================="))
println(fmt.Sprintf("Current time: %s, Users: %v, Duration: %v, Accumulated Transactions: %d Passed, %d Failed",