From: Ivan Maidanski Date: Tue, 11 Oct 2016 14:45:01 +0000 (+0300) Subject: Fix missing printed value names (test_stack) X-Git-Tag: v7.4.6~78 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=642760aa268cd37ded1549ef0d653f6f763c230a;p=libatomic_ops 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. --- 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]; }