linux/tools/tracing
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
..
latency tools/latency-collector: Fix -Wformat-security compile warns 2024-05-23 10:46:01 -04:00
rtla rtla/osnoise: Better report when histogram is empty 2024-06-21 10:19:53 +02:00
Makefile tools/tracing: Update Makefile to build rtla 2022-01-27 19:15:47 -05:00