diff options
author | Mitya Selivanov <automainint@guattari.tech> | 2023-03-25 08:38:16 +0100 |
---|---|---|
committer | Mitya Selivanov <automainint@guattari.tech> | 2023-03-25 08:38:16 +0100 |
commit | ce20101ecb912b294b208e6e59b4a7f9214370c3 (patch) | |
tree | f5dad346e829cc727ae51b418704d78e206a53cf /source/test/unittests/foo.bench.c | |
parent | 3e9760eef4e212b8afe23f5415ef7a37dbfe067d (diff) | |
download | kit-ce20101ecb912b294b208e6e59b4a7f9214370c3.zip |
Microbenchmarks
Diffstat (limited to 'source/test/unittests/foo.bench.c')
-rw-r--r-- | source/test/unittests/foo.bench.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/test/unittests/foo.bench.c b/source/test/unittests/foo.bench.c new file mode 100644 index 0000000..531f1d8 --- /dev/null +++ b/source/test/unittests/foo.bench.c @@ -0,0 +1,13 @@ +#define KIT_BENCH_FILE foo +#include "../../kit_test/bench.h" + +BENCHMARK("foo") { + BENCHMARK_BEGIN; + { + volatile int x = 0; + for (int i = 0; i < 200000; i++) x++; + } + BENCHMARK_END; +} + +BENCHMARK("bar") { } |