Report waste as a fraction
This commit is contained in:
parent
cde84b8756
commit
aa486fe660
@ -155,9 +155,7 @@ func BenchmarkParseStringLatin (benchmark *testing.B) {
|
||||
}
|
||||
meanLen /= benchmark.N
|
||||
meanCap /= benchmark.N
|
||||
benchmark.ReportMetric(float64(meanLen), "len")
|
||||
benchmark.ReportMetric(float64(meanCap), "cap")
|
||||
benchmark.ReportMetric(float64(meanCap - meanLen), "waste")
|
||||
benchmark.ReportMetric(float64(meanCap) / float64(meanLen), "waste")
|
||||
}
|
||||
|
||||
func BenchmarkParseStringChinese (benchmark *testing.B) {
|
||||
@ -170,9 +168,7 @@ func BenchmarkParseStringChinese (benchmark *testing.B) {
|
||||
}
|
||||
meanLen /= benchmark.N
|
||||
meanCap /= benchmark.N
|
||||
benchmark.ReportMetric(float64(meanLen), "len")
|
||||
benchmark.ReportMetric(float64(meanCap), "cap")
|
||||
benchmark.ReportMetric(float64(meanCap - meanLen), "waste")
|
||||
benchmark.ReportMetric(float64(meanCap) / float64(meanLen), "waste")
|
||||
}
|
||||
|
||||
const lipsumLt =
|
||||
|
Loading…
Reference in New Issue
Block a user