x.benchmark: align the output of BenchmarkResult.print/0

This commit is contained in:
Delyan Angelov 2025-05-22 10:00:45 +03:00
parent 90445259d3
commit e2cb01db88
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -250,5 +250,5 @@ fn (r BenchmarkResult) alloced_bytes_per_op() i64 {
// print - all measurements
fn (r BenchmarkResult) print() {
println('Iterations: ${r.n}\t\tTotal Duration: ${r.t}\tns/op: ${r.ns_per_op()}\tB/op: ${r.alloced_bytes_per_op()}\tallocs/op: ${r.allocs_per_op()}')
println('Iterations: ${r.n:10}\t\tTotal Duration: ${r.t:10}\tns/op: ${r.ns_per_op():10}\tB/op: ${r.alloced_bytes_per_op():6}\tallocs/op: ${r.allocs_per_op():6}')
}