rust: Make benchmarker generate readme markdown
This commit is contained in:
parent
b8fd7080b6
commit
07def8f859
|
@ -68,7 +68,7 @@ fn main() {
|
||||||
for day in 0..days.len() {
|
for day in 0..days.len() {
|
||||||
let first_run = days[day](false);
|
let first_run = days[day](false);
|
||||||
if first_run.as_nanos() == 0 {
|
if first_run.as_nanos() == 0 {
|
||||||
println!("Day {:>2}: skipped", day + 1);
|
println!("| {:>2} | - |", day + 1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,11 +79,10 @@ fn main() {
|
||||||
for _ in 0..repetitions {
|
for _ in 0..repetitions {
|
||||||
elapsed += days[day](false) / repetitions;
|
elapsed += days[day](false) / repetitions;
|
||||||
}
|
}
|
||||||
println!("Day {:>2}: {:?}", day + 1, elapsed);
|
println!("| {:>2} | {:>10.2}µs |", day + 1, elapsed.as_secs_f64() * 1_000_000.0);
|
||||||
total += elapsed;
|
total += elapsed;
|
||||||
}
|
}
|
||||||
|
|
||||||
println!("--------------------");
|
println!("| **Total:** | {:>10.3}ms |", total.as_secs_f64() * 1_000.0);
|
||||||
println!("Total: {:?}", total);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue