hermit_bench_output/lib.rs
1/// Log benchmark data to stdout, so it can be captured by the benchmarking framework hermit-bench.
2///
3/// * `benchmark_name` - The name under which the benchmark will be stored.
4/// * `unit` - The unit of the benchmark value.
5/// * `value` - The benchmark value.
6pub fn log_benchmark_data(benchmark_name: &str, unit: &str, value: f64) {
7 println!(
8 "/*BENCHMARK OUTPUT*/\nname: {}\nunit: {}\nvalue: {}\nplot_group: \n/*BENCHMARK OUTPUT END*/",
9 benchmark_name, unit, value
10 );
11}
12
13/// Log benchmark data to stdout, so it can be captured by the benchmarking framework hermit-bench.
14///
15/// * `benchmark_name` - The name under which the benchmark will be stored.
16/// * `unit` - The unit of the benchmark value.
17/// * `value` - The benchmark value.
18/// * `plot_group` - The plot group in which the benchmark will be plotted.
19pub fn log_benchmark_data_with_group(benchmark_name: &str, unit: &str, value: f64, plot_group: &str) {
20 println!(
21 "/*BENCHMARK OUTPUT*/\nname: {}\nunit: {}\nvalue: {}\nplot_group: {}\n/*BENCHMARK OUTPUT END*/",
22 benchmark_name, unit, value, plot_group
23 );
24}