From 77bb2dc094bfe9fff9208a8af94d0da617bdae13 Mon Sep 17 00:00:00 2001 From: data-man Date: Thu, 25 Jun 2020 21:05:52 +0500 Subject: Use writer in benchmarks --- lib/std/hash/benchmark.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/std/hash/benchmark.zig') 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 }); } } } -- cgit v1.2.3