Skip to content

Commit

Permalink
Report is misleading in ch benchmark (#165)
Browse files Browse the repository at this point in the history
Co-authored-by: Alexander Pyhalov <[email protected]>
  • Loading branch information
pyhalov and Alexander Pyhalov authored Apr 3, 2023
1 parent 0c29c49 commit bf36c4c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ch/workload.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,16 +306,16 @@ func (w *Workloader) OutputStats(ifSummaryReport bool) {
w.measurement.Output(ifSummaryReport, w.cfg.OutputStyle, outputRtMeasurement)
if ifSummaryReport {
var count int64
var elapsed float64
var sum float64
for _, m := range w.measurement.OpSumMeasurement {
if !m.Empty() {
r := m.GetInfo()
count += r.Count
elapsed += r.Elapsed
sum += r.Sum
}
}
if elapsed != 0 {
fmt.Printf("QphH: %.1f\n", 3600/elapsed*float64(count))
if sum != 0 {
fmt.Printf("QphH: %.1f\n", 3600*1000/sum*float64(count))
}
}
}
Expand Down

0 comments on commit bf36c4c

Please sign in to comment.