From: nsz Date: Tue, 27 Mar 2012 00:48:37 +0000 (+0200) Subject: set min benchmark time threshold to 200ms X-Git-Url: http://nsz.repo.hu/git/?p=libc-test;a=commitdiff_plain;h=b6dbb95f8a8985e2b89627beb357486862286074 set min benchmark time threshold to 200ms --- diff --git a/Makefile b/Makefile index 03a172f..dc5c6fd 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ DIRS = $(sort $(wildcard src/*)) all: for i in $(DIRS); do echo $$i; make -s -C $$i; done -#t: all +t: all # for i in $(DIRS); do echo $$i; $$i/t; done b: all for i in $(DIRS); do echo $$i; $$i/b; done diff --git a/common/b.c b/common/b.c index 6fa1963..91f137e 100644 --- a/common/b.c +++ b/common/b.c @@ -26,6 +26,7 @@ static unsigned long long dt; #define SEC 1000000000ULL #define MAXN 500000000 +#define MINT (SEC/5) static unsigned long long tic() { struct timespec ts; @@ -59,9 +60,9 @@ static int nextN() { unsigned long long i; if (n) - n = SEC/2/n; + n = MINT/n; else - n = SEC/2; + n = MINT; n += n/2; if (n > N*100ULL) n = N*100ULL;