Skip to content

Commit

Permalink
fix 精度缺失
Browse files Browse the repository at this point in the history
  • Loading branch information
link1st committed Dec 28, 2023
1 parent 272a433 commit b506948
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/statistics/statistics.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func calculateData(concurrent, processingTime, requestTime, maxTime, minTime, su
)
// 平均 QPS 成功数*总协程数/总耗时 (每秒)
if processingTime != 0 {
qps = float64(successNum*1e9*concurrent) / float64(processingTime)
qps = float64(successNum*concurrent) * (1e9 / float64(processingTime))
}
// 平均时长 总耗时/总请求数/并发数 纳秒=>毫秒
if successNum != 0 && concurrent != 0 {
Expand Down

0 comments on commit b506948

Please sign in to comment.