linux/tools/tracing/rtla/src
Luis Claudio R. Goncalves 587f05a88b rtla/osnoise: Better report when histogram is empty
When osnoise hist does not observe any samples above the threshold,
no entries are recorded and the final report shows empty entries
for the usual statistics (count, min, max, avg):

    [~]# osnoise hist -d 5s -T 500
    # RTLA osnoise histogram
    # Time unit is microseconds (us)
    # Duration:   0 00:00:05
    Index
    over:
    count:
    min:
    avg:
    max:

That could lead users to confusing interpretations of the results.

A simple solution is to report 0 for count and the statistics, making it
clear that no noise (above the defined threshold) was observed:

    [~]# osnoise hist -d 5s -T 500
    # RTLA osnoise histogram
    # Time unit is microseconds (us)
    # Duration:   0 00:00:05
    Index
    over: 0
    count: 0
    min: 0
    avg: 0
    max: 0

Link: https://lkml.kernel.org/r/Zml6JmH5cbS7-HfZ@uudg.org

Cc: Daniel Bristot de Oliveira <bristot@kernel.org>
Cc: John Kacur <jkacur@redhat.com>
Cc: Clark Williams <williams@redhat.com>
Reviewed-by: John Kacur <jkacur@redhat.com>
Signed-off-by: Luis Claudio R. Goncalves <lgoncalv@redhat.com>
Signed-off-by: Daniel Bristot de Oliveira <bristot@kernel.org>
2024-06-21 10:19:53 +02:00
..
Build tools/rtla: Use tools/build makefiles to build rtla 2024-03-20 05:39:06 +01:00
osnoise.c rtla/timerlat_top: Add timerlat user-space support 2023-06-13 16:38:51 -04:00
osnoise.h rtla/timerlat_top: Add timerlat user-space support 2023-06-13 16:38:51 -04:00
osnoise_hist.c rtla/osnoise: Better report when histogram is empty 2024-06-21 10:19:53 +02:00
osnoise_top.c rtla/osnoise: Use pretty formatting only on interactive tty 2024-06-21 10:17:51 +02:00
rtla.c rtla: Add hwnoise tool 2023-02-13 23:56:46 -05:00
timerlat.c rtla: Fix exit status when returning from calls to usage() 2022-12-09 18:06:24 -05:00
timerlat.h rtla/timerlat: Add timerlat hist mode 2022-01-13 17:02:43 -05:00
timerlat_aa.c rtla/auto-analysis: Replace \t with spaces 2024-05-15 15:13:56 +02:00
timerlat_aa.h rtla/timerlat: Give timerlat auto analysis its own instance 2023-06-13 16:31:35 -04:00
timerlat_hist.c rtla: Fix -t\--trace[=file] 2024-05-16 16:49:10 +02:00
timerlat_top.c rtla: Fix -t\--trace[=file] 2024-05-16 16:49:10 +02:00
timerlat_u.c rtla/timerlat: Do not stop user-space if a cpu is offline 2023-09-22 14:43:46 +02:00
timerlat_u.h rtla/timerlat_top: Add timerlat user-space support 2023-06-13 16:38:51 -04:00
trace.c rtla: Add --trace-buffer-size option 2024-05-16 16:44:34 +02:00
trace.h rtla: Add --trace-buffer-size option 2024-05-16 16:44:34 +02:00
utils.c tools/rtla: Replace setting prio with nice for SCHED_OTHER 2024-02-12 10:56:36 +01:00
utils.h tools/rtla: Replace setting prio with nice for SCHED_OTHER 2024-02-12 10:56:36 +01:00