Dumping cmph_uint32.

This commit is contained in:
Davi de Castro Reis
2011-02-13 23:32:50 -02:00
parent 5b78c02da0
commit b2da526497
2 changed files with 12 additions and 0 deletions

22
src/cmph_benchmark_test.c Normal file
View File

@@ -0,0 +1,22 @@
#include <unistd.h> // for sleep
#include <limits.h>
#include "cmph_benchmark.h"
void bm_sleep(int iters) {
sleep(1);
}
void bm_increment(int iters) {
int i, v = 0;
for (i = 0; i < INT_MAX; ++i) {
v += i;
}
}
int main(int argc, char** argv) {
BM_REGISTER(bm_sleep, 1);
BM_REGISTER(bm_increment, 1);
run_benchmarks(argc, argv);
}