Export intermediate results after each benchmark command

This commit is contained in:
Martin Junghanns authored and David Peter committed 2020-10-18 09:13:56 +02:00
1 parent 4fa16852cf
commit d7e6fa6dfb
2 files changed
+10 -10

No files matched your search

+9 -9
View File
@@ -49,6 +49,15 @@ fn run(
// Run the benchmarks
for (num, cmd) in commands.iter().enumerate() {
timing_results.push(run_benchmark(num, cmd, shell_spawning_time, options)?);
// Export (intermediate) results
let ans = export_manager.write_results(&timing_results, options.time_unit);
if let Err(e) = ans {
error(&format!(
"The following error occurred while exporting: {}",
e
));
}
}
// Print relative speed comparison
@@ -56,15 +65,6 @@ fn run(
write_benchmark_comparison(&timing_results);
}
// Export results
let ans = export_manager.write_results(timing_results, options.time_unit);
if let Err(e) = ans {
error(&format!(
"The following error occurred while exporting: {}",
e
));
}
Ok(())
}