summaryrefslogtreecommitdiffhomepage
path: root/test/benchmarks/tools
diff options
context:
space:
mode:
Diffstat (limited to 'test/benchmarks/tools')
-rw-r--r--test/benchmarks/tools/fio.go11
1 files changed, 4 insertions, 7 deletions
diff --git a/test/benchmarks/tools/fio.go b/test/benchmarks/tools/fio.go
index f6324c3ab..ea12436d2 100644
--- a/test/benchmarks/tools/fio.go
+++ b/test/benchmarks/tools/fio.go
@@ -62,18 +62,15 @@ func (f *Fio) Report(b *testing.B, output string) {
// parseBandwidth reports the bandwidth in b/s.
func (f *Fio) parseBandwidth(data string, isRead bool) (float64, error) {
+ op := "write"
if isRead {
- result, err := f.parseFioJSON(data, "read", "bw")
- if err != nil {
- return 0, err
- }
- return 1024 * result, nil
+ op = "read"
}
- result, err := f.parseFioJSON(data, "write", "bw")
+ result, err := f.parseFioJSON(data, op, "bw")
if err != nil {
return 0, err
}
- return 1024 * result, nil
+ return result * 1024, nil
}
// parseIOps reports the write IO per second metric.