Commit f834f40d authored by Kirill Smelkov's avatar Kirill Smelkov

X zhash: Show N(obj) read, not 1, in place of N(iter)

parent 7f22bba6
...@@ -230,9 +230,9 @@ loop: ...@@ -230,9 +230,9 @@ loop:
hresult, oid-1, nread, δt, δt / time.Duration(oid), x) // XXX /oid cast ? hresult, oid-1, nread, δt, δt / time.Duration(oid), x) // XXX /oid cast ?
} else { } else {
topic := fmt.Sprintf(bench, x) // XXX -> better text/template topic := fmt.Sprintf(bench, x) // XXX -> better text/template
fmt.Printf("Benchmark%s 1 %.1f µs/object\t# %s oid=0..%d nread=%d t=%s\n", fmt.Printf("Benchmark%s %d %.1f µs/object\t# %s nread=%d t=%s\n",
topic, float64(δt) / float64(oid) / float64(time.Microsecond), topic, oid-1, float64(δt) / float64(oid) / float64(time.Microsecond),
hresult, oid-1, nread, δt) hresult, nread, δt)
} }
if check != "" && hresult != check { if check != "" && hresult != check {
......
...@@ -173,8 +173,8 @@ def zhash(): ...@@ -173,8 +173,8 @@ def zhash():
(hresult, oid-1, nread, dt, dt * 1E6 / oid, x)) (hresult, oid-1, nread, dt, dt * 1E6 / oid, x))
else: else:
topic = bench % x topic = bench % x
print('Benchmark%s 1 %.1f µs/object\t# %s oid=0..%d nread=%d t=%.3fs' % \ print('Benchmark%s %d %.1f µs/object\t# %s nread=%d t=%.3fs' % \
(topic, dt * 1E6 / oid, hresult, oid-1, nread, dt)) (topic, oid-1, dt * 1E6 / oid, hresult, nread, dt))
if check != None and hresult != check: if check != None and hresult != check:
print("%s: hash mismatch: expected %s ; got %s\t# x=%s" % (url, check, hresult, x), file=sys.stderr) print("%s: hash mismatch: expected %s ; got %s\t# x=%s" % (url, check, hresult, x), file=sys.stderr)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment