Minor change to user measurements
authorBarret Rhoden <brho@cs.berkeley.edu>
Mon, 13 May 2013 02:44:17 +0000 (19:44 -0700)
committerBarret Rhoden <brho@cs.berkeley.edu>
Mon, 13 May 2013 02:44:17 +0000 (19:44 -0700)
This allows the throughput to handle a break in the samples.  This is
useful if you only want to report some samples.  For example, you can
set a timestamp field bool valid = (num_vcores() == max_vcores()) to
only record samples that happen when we have all the vcores.

user/parlib/measure.c

index 246c2bb..0ce3071 100644 (file)
@@ -259,7 +259,7 @@ void print_throughput(void **data, unsigned int nr_steps, uint64_t interval,
                        for ( ; next_sample[i] < nr_j; next_sample[i]++) {
                                /* skip this thread if it has no more data */
                                if (get_sample(data, i, next_sample[i], &sample))
-                                       break;
+                                       continue;
                                /* break when we found one that hasn't happened yet */
                                if (!(sample <= time_now))
                                        break;