Moved benchmark code into tests directory.

This commit is contained in:
Davi de Castro Reis
2011-05-15 17:19:08 -03:00
parent af887685f5
commit 532ee999b9
3 changed files with 4 additions and 5 deletions

View File

@@ -1,5 +1,4 @@
bin_PROGRAMS = cmph
check_PROGRAMS = cmph_benchmark_test
noinst_PROGRAMS = bm_numbers
lib_LTLIBRARIES = libcmph.la
include_HEADERS = cmph.h cmph_types.h cmph_time.h chd_ph.h
@@ -34,8 +33,5 @@ libcmph_la_LDFLAGS = -version-info 0:0:0
cmph_SOURCES = main.c wingetopt.h wingetopt.c
cmph_LDADD = libcmph.la
cmph_benchmark_test_SOURCES = cmph_benchmark_test.c
cmph_benchmark_test_LDADD = libcmph.la
bm_numbers_SOURCES = bm_numbers.c
bm_numbers_LDADD = libcmph.la

View File

@@ -1,23 +0,0 @@
#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);
return 0;
}