[ovs-dev] [PATCH] perf-counter: Split numbers in the output.
Ilya Maximets
i.maximets at ovn.org
Fri Nov 27 23:38:00 UTC 2020
On 11/20/20 6:59 PM, Gregory Rose wrote:
>
>
> On 11/18/2020 1:05 PM, Ilya Maximets wrote:
>> 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: 619c3a42dc1e ("lib: add a hardware performance counter access library")
>> Signed-off-by: Ilya Maximets <i.maximets at ovn.org>
>> ---
>> lib/perf-counter.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/lib/perf-counter.c b/lib/perf-counter.c
>> index 402fabe17..e4eca58d0 100644
>> --- a/lib/perf-counter.c
>> +++ b/lib/perf-counter.c
>> @@ -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);
>> }
>>
>
> Seems straightforward enough. LGTM
>
> Acked-by: Greg Rose <gvrose8192 at gmail.com>
Thanks!
Applied to master. I didn't backport that since it's not very
important and it's a code for developers only, so likely will
be used exclusively on master.
Best regards, Ilya Maximets.
More information about the dev
mailing list