aboutsummaryrefslogtreecommitdiff
path: root/lib/std/hash/benchmark.zig
diff options
context:
space:
mode:
authordata-man <datamanrb@gmail.com>2020-06-25 21:05:52 +0500
committerAndrew Kelley <andrew@ziglang.org>2020-06-25 19:07:25 -0400
commit77bb2dc094bfe9fff9208a8af94d0da617bdae13 (patch)
treeee8d05c4b0e890da62c2a12f4f94b26790377e31 /lib/std/hash/benchmark.zig
parent41c6cc9001a1a95ea6471c86a1ff4b59890de115 (diff)
downloadzig-77bb2dc094bfe9fff9208a8af94d0da617bdae13.tar.gz
zig-77bb2dc094bfe9fff9208a8af94d0da617bdae13.zip
Use writer in benchmarks
Diffstat (limited to 'lib/std/hash/benchmark.zig')
-rw-r--r--lib/std/hash/benchmark.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/std/hash/benchmark.zig b/lib/std/hash/benchmark.zig
index 255c98e409..0eb3a25fe1 100644
--- a/lib/std/hash/benchmark.zig
+++ b/lib/std/hash/benchmark.zig
@@ -172,7 +172,7 @@ fn mode(comptime x: comptime_int) comptime_int {
}
pub fn main() !void {
- const stdout = std.io.getStdOut().outStream();
+ const stdout = std.io.getStdOut().writer();
var buffer: [1024]u8 = undefined;
var fixed = std.heap.FixedBufferAllocator.init(buffer[0..]);
@@ -248,13 +248,13 @@ pub fn main() !void {
if (H.has_iterative_api) {
prng.seed(seed);
const result = try benchmarkHash(H, count);
- try stdout.print(" iterative: {:4} MiB/s [{x:0<16}]\n", .{ result.throughput / (1 * MiB), result.hash });
+ try stdout.print(" iterative: {:5} MiB/s [{x:0<16}]\n", .{ result.throughput / (1 * MiB), result.hash });
}
if (!test_iterative_only) {
prng.seed(seed);
const result_small = try benchmarkHashSmallKeys(H, key_size, count);
- try stdout.print(" small keys: {:4} MiB/s [{x:0<16}]\n", .{ result_small.throughput / (1 * MiB), result_small.hash });
+ try stdout.print(" small keys: {:5} MiB/s [{x:0<16}]\n", .{ result_small.throughput / (1 * MiB), result_small.hash });
}
}
}