summaryrefslogtreecommitdiff
path: root/benchmarks/gem_wsim.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2017-05-17 19:54:49 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2017-05-17 19:57:54 +0100
commitcb5479a767b26cd8a3729d59c2b21e50f07cd81b (patch)
treea63f1a05e32a8f979f5c73b25e69f74984e167c3 /benchmarks/gem_wsim.c
parentf87eb22d43ee040d7f85c3737e344b70e05f3101 (diff)
wsim: Fix reporting of workload/s for slaves
Slaves just keep on running, far beyond the repeat target of their master. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'benchmarks/gem_wsim.c')
-rw-r--r--benchmarks/gem_wsim.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/benchmarks/gem_wsim.c b/benchmarks/gem_wsim.c
index c19cf1b3..59553940 100644
--- a/benchmarks/gem_wsim.c
+++ b/benchmarks/gem_wsim.c
@@ -1400,14 +1400,15 @@ run_workload(unsigned int id, struct workload *wrk,
bool run = true;
int throttle = -1;
int qd_throttle = -1;
- int i, j;
+ int count;
+ int i;
clock_gettime(CLOCK_MONOTONIC, &t_start);
hars_petruska_f54_1_random_seed((flags & SYNCEDCLIENTS) ? 0 : id);
init_status_page(wrk, INIT_ALL);
- for (j = 0; run && (background || j < repeat); j++) {
+ for (count = 0; run && (background || count < repeat); count++) {
unsigned int cur_seqno = wrk->sync_seqno;
clock_gettime(CLOCK_MONOTONIC, &wrk->repeat_start);
@@ -1428,7 +1429,7 @@ run_workload(unsigned int id, struct workload *wrk,
if (do_sleep < 0) {
if (verbose > 1)
printf("%u: Dropped period @ %u/%u (%dus late)!\n",
- id, j, i, do_sleep);
+ id, count, i, do_sleep);
continue;
}
} else if (w->type == SYNC) {
@@ -1553,8 +1554,8 @@ run_workload(unsigned int id, struct workload *wrk,
if (print_stats) {
double t = elapsed(&t_start, &t_end);
- printf("%c%u: %.3fs elapsed (%.3f workloads/s).",
- background ? ' ' : '*', id, t, repeat / t);
+ printf("%c%u: %.3fs elapsed (%d cycles, %.3f workloads/s).",
+ background ? ' ' : '*', id, t, count, count / t);
if (balancer)
printf(" %lu (%lu + %lu) total VCS batches.",
wrk->nr_bb[VCS], wrk->nr_bb[VCS1], wrk->nr_bb[VCS2]);