diff options
author | Will Newton <will.newton@linaro.org> | 2013-07-31 15:44:02 +0100 |
---|---|---|
committer | Will Newton <will.newton@linaro.org> | 2013-07-31 15:44:02 +0100 |
commit | 05987d3a8c6342f570a5e1e8db12ce62a014712a (patch) | |
tree | 7a536d02f68ccf411d943bcd4026b1a1204a912c | |
parent | 36e7f3b7f99c59630584d3ed635bacb793721f6b (diff) |
benchmarks/mallocbench.c: Make sure original thread count is printed.
-rw-r--r-- | benchmarks/mallocbench.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/benchmarks/mallocbench.c b/benchmarks/mallocbench.c index 6f61552..b6488cc 100644 --- a/benchmarks/mallocbench.c +++ b/benchmarks/mallocbench.c @@ -266,7 +266,7 @@ int main(int argc, char **argv) { size_t blk_min = 512, blk_max = 512, num_blks = 10000; int loops = 10000000; - int threads = 1; + int threads = 1, orig_threads; enum test_type test_type = TEST_ALLOC; const char *test_name = "alloc"; bool clear = false; @@ -316,6 +316,7 @@ int main(int argc, char **argv) int thread_blks = num_blks / threads; int thread_loops = loops / threads; + orig_threads = threads; if (test_type == TEST_PROD_CONS) threads = threads * 2; @@ -385,7 +386,7 @@ int main(int argc, char **argv) /* Dump both machine and human readable versions */ printf("%s:%s:%u:%u:%u:%u:%u:%s:%u:%.6f: took %.6f s for %u malloc/free benchmark loops of %u-%u bytes. ~%.3f us per loop\n", - variant + 4, test_name, blk_min, blk_max, loops, threads, + variant + 4, test_name, blk_min, blk_max, loops, orig_threads, (int)clear, run_id, usage.ru_maxrss, elapsed, elapsed, loops, blk_min, blk_max, (double)(elapsed / loops) * 1e6); |