]> granicus.if.org Git - libatomic_ops/commitdiff
Fix missing printed value names (test_stack)
authorIvan Maidanski <ivmai@mail.ru>
Tue, 11 Oct 2016 14:45:01 +0000 (17:45 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Wed, 2 Nov 2016 08:44:10 +0000 (11:44 +0300)
* tests/test_stack.c [VERBOSE] (main): Print value name along with the
value itself; print "ms" for time value; remove extra get_msecs() call.

tests/test_stack.c

index a3c5c30a01ce398b8fea9ffd6d5b1be2feedabc9..0da83478fb1389e2a40751548bad6ce63642104d 100644 (file)
@@ -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];
           }