tools/tracing/rtla: osnoise_hist: display average with two-digit precision

Calculate average value in osnoise-hist summary with two-digit
precision to avoid displaying too optimitic results.

Link: https://lkml.kernel.org/r/20230103103400.275566-3-br015@umbiko.net

Signed-off-by: Andreas Ziegler <br015@umbiko.net>
Acked-by: Daniel Bristot de Oliveira <bristot@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
This commit is contained in:
Andreas Ziegler 2023-01-03 11:34:00 +01:00 коммит произвёл Steven Rostedt (Google)
Родитель fe137a4fe0
Коммит 1fab1469b6
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -335,8 +335,8 @@ osnoise_print_summary(struct osnoise_hist_params *params,
continue;
if (data->hist[cpu].count)
trace_seq_printf(trace->seq, "%9llu ",
data->hist[cpu].sum_sample / data->hist[cpu].count);
trace_seq_printf(trace->seq, "%9.2f ",
((double) data->hist[cpu].sum_sample) / data->hist[cpu].count);
else
trace_seq_printf(trace->seq, " - ");
}