From 7ddce488e074c3f052949ba513a340446cea86e9 Mon Sep 17 00:00:00 2001 From: Jose Colon Rodriguez Date: Thu, 18 Jul 2024 08:04:58 -0400 Subject: Fixed benchmark duration printing --- bench/src/zg_normalize.zig | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'bench/src/zg_normalize.zig') diff --git a/bench/src/zg_normalize.zig b/bench/src/zg_normalize.zig index fb0d4ee..1e2cfab 100644 --- a/bench/src/zg_normalize.zig +++ b/bench/src/zg_normalize.zig @@ -30,7 +30,7 @@ pub fn main() !void { const nfkc = try normalize.nfkc(allocator, line); result += nfkc.slice.len; } - std.debug.print("zg Normalize.nfkc: result: {}, took: {}\n", .{ result, std.fmt.fmtDuration(timer.lap() / std.time.ns_per_ms) }); + std.debug.print("zg Normalize.nfkc: result: {}, took: {}\n", .{ result, std.fmt.fmtDuration(timer.lap()) }); result = 0; iter.reset(); @@ -40,7 +40,7 @@ pub fn main() !void { const nfc = try normalize.nfc(allocator, line); result += nfc.slice.len; } - std.debug.print("zg Normalize.nfc: result: {}, took: {}\n", .{ result, std.fmt.fmtDuration(timer.lap() / std.time.ns_per_ms) }); + std.debug.print("zg Normalize.nfc: result: {}, took: {}\n", .{ result, std.fmt.fmtDuration(timer.lap()) }); result = 0; iter.reset(); @@ -50,7 +50,7 @@ pub fn main() !void { const nfkd = try normalize.nfkd(allocator, line); result += nfkd.slice.len; } - std.debug.print("zg Normalize.nfkd: result: {}, took: {}\n", .{ result, std.fmt.fmtDuration(timer.lap() / std.time.ns_per_ms) }); + std.debug.print("zg Normalize.nfkd: result: {}, took: {}\n", .{ result, std.fmt.fmtDuration(timer.lap()) }); result = 0; iter.reset(); @@ -60,7 +60,7 @@ pub fn main() !void { const nfd = try normalize.nfd(allocator, line); result += nfd.slice.len; } - std.debug.print("zg Normalize.nfd: result: {}, took: {}\n", .{ result, std.fmt.fmtDuration(timer.lap() / std.time.ns_per_ms) }); + std.debug.print("zg Normalize.nfd: result: {}, took: {}\n", .{ result, std.fmt.fmtDuration(timer.lap()) }); result = 0; iter.reset(); @@ -73,5 +73,5 @@ pub fn main() !void { @memcpy(buf[0..line.len], line); prev_line = buf[0..line.len]; } - std.debug.print("Zg Normalize.eql: result: {}, took: {}\n", .{ result, std.fmt.fmtDuration(timer.lap() / std.time.ns_per_ms) }); + std.debug.print("Zg Normalize.eql: result: {}, took: {}\n", .{ result, std.fmt.fmtDuration(timer.lap()) }); } -- cgit v1.2.3