Skip to content

Commit

Permalink
perf-counter: Split numbers in the output.
Browse files Browse the repository at this point in the history
While trying to benchmark big functions, values could be longer than
12 digits.  In this case all of them printed without spaces.  It's
hard ot read.

Fixes: 619c3a4 ("lib: add a hardware performance counter access library")
Signed-off-by: Ilya Maximets <[email protected]>
Acked-by: Greg Rose <[email protected]>
  • Loading branch information
igsilya committed Nov 27, 2020
1 parent dc497e3 commit cd9e88e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/perf-counter.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ perf_counter_to_ds(struct ds *ds, struct perf_counter *pfc)
ratio = 0.0;
}

ds_put_format(ds, "%-40s%12"PRIu64"%12"PRIu64"%12.1f\n",
ds_put_format(ds, "%-40s %12"PRIu64" %12"PRIu64" %12.1f\n",
pfc->name, pfc->n_events, pfc->total_count, ratio);
}

Expand Down

0 comments on commit cd9e88e

Please sign in to comment.