lkml.org 
[lkml]   [2023]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH 0/2 v2] rtla osnoise hist average calculation
Date
Version 2 of the proposed patch, with changes split in two separate commits, 
as suggested by Daniel Bristot de Oliveira

rtla osnoise hist always outputs '0' as average duration value. Example:

# rtla osnoise hist -P F:1 -c 0-1 -r 900000 -d 1M -b 1 -E 5000 -T 1
# RTLA osnoise histogram
# Time unit is microseconds (us)
# Duration: 0 00:01:00
...
count: 5629 1364
min: 1 1
avg: 0 0
max: 2955 56

This is due to sum_sample in osnoise_hist_update_multiple() being calculated
as the sum (duration), not as sum (duration * count).

Truncating of the average value in final output suggests too optimistic
results; display floating point value instead.

Andreas Ziegler (2):
tools/tracing/rtla: osnoise_hist: use total duration for average
calculation
tools/tracing/rtla: osnoise_hist: display average with two-digit
precision

tools/tracing/rtla/src/osnoise_hist.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

--
2.34.1

\
 
 \ /
  Last update: 2023-03-26 23:25    [W:0.521 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site