set min benchmark time threshold to 200ms
authornsz <nsz@port70.net>
Tue, 27 Mar 2012 00:48:37 +0000 (02:48 +0200)
committernsz <nsz@port70.net>
Tue, 27 Mar 2012 00:48:37 +0000 (02:48 +0200)
Makefile
common/b.c

index 03a172f..dc5c6fd 100644 (file)
--- 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
index 6fa1963..91f137e 100644 (file)
@@ -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;