authorgravatar for 124872+jedisct1@users.noreply.github.comFrank Denis <124872+jedisct1@users.noreply.github.com> 2021-02-28 12:53:27+01:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2021-02-28 21:55:24+02:00
logb959029f88fa033e54e72e42004bc261baada1f1
treefe88fbbbf198886f79eea6af0e0b6fe97a9d5ad5
parente65b6d99ac38686228bf5b5b9c1121382e05da4b

std/crypto/benchmark: update format strings

Use the s formatter to format strings.

1 files changed, 9 insertions(+), 9 deletions(-)

lib/std/crypto/benchmark.zig+9-9
......@@ -356,63 +356,63 @@ pub fn main() !void {
356356 inline for (hashes) |H| {
357357 if (filter == null or std.mem.indexOf(u8, H.name, filter.?) != null) {
358358 const throughput = try benchmarkHash(H.ty, mode(128 * MiB));
359 try stdout.print("{:>17}: {:10} MiB/s\n", .{ H.name, throughput / (1 * MiB) });
359 try stdout.print("{s:>17}: {:10} MiB/s\n", .{ H.name, throughput / (1 * MiB) });
360360 }
361361 }
362362
363363 inline for (macs) |M| {
364364 if (filter == null or std.mem.indexOf(u8, M.name, filter.?) != null) {
365365 const throughput = try benchmarkMac(M.ty, mode(128 * MiB));
366 try stdout.print("{:>17}: {:10} MiB/s\n", .{ M.name, throughput / (1 * MiB) });
366 try stdout.print("{s:>17}: {:10} MiB/s\n", .{ M.name, throughput / (1 * MiB) });
367367 }
368368 }
369369
370370 inline for (exchanges) |E| {
371371 if (filter == null or std.mem.indexOf(u8, E.name, filter.?) != null) {
372372 const throughput = try benchmarkKeyExchange(E.ty, mode(1000));
373 try stdout.print("{:>17}: {:10} exchanges/s\n", .{ E.name, throughput });
373 try stdout.print("{s:>17}: {:10} exchanges/s\n", .{ E.name, throughput });
374374 }
375375 }
376376
377377 inline for (signatures) |E| {
378378 if (filter == null or std.mem.indexOf(u8, E.name, filter.?) != null) {
379379 const throughput = try benchmarkSignature(E.ty, mode(1000));
380 try stdout.print("{:>17}: {:10} signatures/s\n", .{ E.name, throughput });
380 try stdout.print("{s:>17}: {:10} signatures/s\n", .{ E.name, throughput });
381381 }
382382 }
383383
384384 inline for (signature_verifications) |E| {
385385 if (filter == null or std.mem.indexOf(u8, E.name, filter.?) != null) {
386386 const throughput = try benchmarkSignatureVerification(E.ty, mode(1000));
387 try stdout.print("{:>17}: {:10} verifications/s\n", .{ E.name, throughput });
387 try stdout.print("{s:>17}: {:10} verifications/s\n", .{ E.name, throughput });
388388 }
389389 }
390390
391391 inline for (batch_signature_verifications) |E| {
392392 if (filter == null or std.mem.indexOf(u8, E.name, filter.?) != null) {
393393 const throughput = try benchmarkBatchSignatureVerification(E.ty, mode(1000));
394 try stdout.print("{:>17}: {:10} verifications/s (batch)\n", .{ E.name, throughput });
394 try stdout.print("{s:>17}: {:10} verifications/s (batch)\n", .{ E.name, throughput });
395395 }
396396 }
397397
398398 inline for (aeads) |E| {
399399 if (filter == null or std.mem.indexOf(u8, E.name, filter.?) != null) {
400400 const throughput = try benchmarkAead(E.ty, mode(128 * MiB));
401 try stdout.print("{:>17}: {:10} MiB/s\n", .{ E.name, throughput / (1 * MiB) });
401 try stdout.print("{s:>17}: {:10} MiB/s\n", .{ E.name, throughput / (1 * MiB) });
402402 }
403403 }
404404
405405 inline for (aes) |E| {
406406 if (filter == null or std.mem.indexOf(u8, E.name, filter.?) != null) {
407407 const throughput = try benchmarkAes(E.ty, mode(100000000));
408 try stdout.print("{:>17}: {:10} ops/s\n", .{ E.name, throughput });
408 try stdout.print("{s:>17}: {:10} ops/s\n", .{ E.name, throughput });
409409 }
410410 }
411411
412412 inline for (aes8) |E| {
413413 if (filter == null or std.mem.indexOf(u8, E.name, filter.?) != null) {
414414 const throughput = try benchmarkAes8(E.ty, mode(10000000));
415 try stdout.print("{:>17}: {:10} ops/s\n", .{ E.name, throughput });
415 try stdout.print("{s:>17}: {:10} ops/s\n", .{ E.name, throughput });
416416 }
417417 }
418418}