Add simple benchmark runner.

This commit is contained in:
Dmitry Atamanov
2023-08-29 15:19:30 +05:00
committed by Christoffer Lerno
parent 79f964dce9
commit efb492eace
3 changed files with 149 additions and 15 deletions

View File

@@ -0,0 +1,29 @@
import std::thread;
fn void! bench1() @benchmark
{
return std::thread::sleep_ms(1);
}
fn void! bench123456789() @benchmark
{
return std::thread::sleep_ms(2);
}
fn void! long_name_bench() @benchmark
{
return std::thread::sleep_ms(3);
}
fn void! very_long_name_bench() @benchmark
{
return std::thread::sleep_ms(10);
}
static initialize
{
set_benchmark_warmup_iterations(5);
set_benchmark_max_iterations(1000);
}