summaryrefslogtreecommitdiff
path: root/bench
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2014-11-05 01:40:35 -0500
committerOri Bernstein <ori@eigenstate.org>2014-11-05 01:40:35 -0500
commit6d7e87f1599c3af33dc52d9867b60d845441f760 (patch)
tree067f6f8c5bd671e644a74d19b704ab02301d0142 /bench
parent86176386c885b1f424d86321c06ca353842fa3b1 (diff)
downloadmc-6d7e87f1599c3af33dc52d9867b60d845441f760.tar.gz
Fix up pattern tree generation.
We're no longer clobbering things with wildcards.
Diffstat (limited to 'bench')
-rw-r--r--bench/runner.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/bench/runner.c b/bench/runner.c
index baa2149..a43d65b 100644
--- a/bench/runner.c
+++ b/bench/runner.c
@@ -50,7 +50,7 @@ double run(char *prog)
return sec + usec;
}
-void timed_run(char *prog)
+double timed_run(char *prog)
{
double avg, m, d, x;
int i, n;
@@ -66,15 +66,19 @@ void timed_run(char *prog)
m = m + d*(x - avg);
}
printf("%s:\t%fs (σ^2: %f)\n", prog, avg, m/(n-1));
+ return avg;
}
int main(int argc, char **argv)
{
+ double tot;
int i;
printf("Running benchmarks: %d samples per binary\n", Nsamp);
+ tot = 0;
for (i = 1; i < argc; i++)
- timed_run(argv[i]);
+ tot += timed_run(argv[i]);
+ printf("total:\t%fs\n", tot);
return 0;
}