diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2016-10-11 17:45:01 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2016-10-11 17:45:01 +0300 |
commit | b4c949bb32e7021b70b399b31d8535cc7b437e1c (patch) | |
tree | 930f2e820801b51a3a7cfd1e0dbfedbfe3442bf7 /tests | |
parent | 2430131b2515f4e24f81368a573a3b8966849b53 (diff) | |
download | libatomic_ops-b4c949bb32e7021b70b399b31d8535cc7b437e1c.tar.gz |
Fix missing printed value names (test_stack)
* tests/test_stack.c [VERBOSE] (main): Print value name along with the
value itself; print "ms" for time value; remove extra get_msecs() call.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_stack.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_stack.c b/tests/test_stack.c index a3c5c30..0da8347 100644 --- a/tests/test_stack.c +++ b/tests/test_stack.c @@ -294,8 +294,8 @@ int main(int argc, char **argv) } times[nthreads][exper_n] = (unsigned long)(get_msecs() - start_time); # ifdef VERBOSE - printf("%d %lu\n", nthreads, - (unsigned long)(get_msecs() - start_time)); + printf("nthreads=%d, time_ms=%lu\n", + nthreads, times[nthreads][exper_n]); printf("final list (should be reordered initial list):\n"); print_list(); # endif @@ -313,8 +313,8 @@ int main(int argc, char **argv) LIMIT, LIMIT, nthreads); # ifndef NO_TIMES for (exper_n = 0; exper_n < N_EXPERIMENTS; ++exper_n) { -# if defined(VERBOSE) - printf(" [%lu]", times[nthreads][exper_n]); +# ifdef VERBOSE + printf(" [%lums]", times[nthreads][exper_n]); # endif sum += times[nthreads][exper_n]; } |