56 lines
2.1 KiB
Diff
56 lines
2.1 KiB
Diff
From 0292c8963611f3376b88335b372cfc32b96db8cc Mon Sep 17 00:00:00 2001
|
|
From: Punit Agrawal <punit1.agrawal@toshiba.co.jp>
|
|
Date: Mon, 18 Oct 2021 14:57:36 +0900
|
|
Subject: [PATCH 3/6] rteval: cyclictest.py: Skip statistics reporting in case
|
|
of an overflow
|
|
|
|
The cyclictest.py module recently gained the capability to parse max
|
|
latency values as reported by cyclictest.
|
|
|
|
When the max latency exceeds the range of the latency histogram (or in
|
|
other words, the number of configured buckets), statistics such as
|
|
mean and standard deviation can not be calculated correctly due to
|
|
lost samples during measurement.
|
|
|
|
In the case of lost samples, skip statistics generation and report the
|
|
max latency warning to the user to rerun the measurement.
|
|
|
|
Signed-off-by: Punit Agrawal <punit1.agrawal@toshiba.co.jp>
|
|
- Small edit to the explanation
|
|
Signed-off-by: John Kacur <jkacur@redhat.com>
|
|
---
|
|
rteval/modules/measurement/cyclictest.py | 10 ++++++++++
|
|
1 file changed, 10 insertions(+)
|
|
|
|
diff --git a/rteval/modules/measurement/cyclictest.py b/rteval/modules/measurement/cyclictest.py
|
|
index e459c1839865..c094df499403 100644
|
|
--- a/rteval/modules/measurement/cyclictest.py
|
|
+++ b/rteval/modules/measurement/cyclictest.py
|
|
@@ -67,6 +67,9 @@ class RunData:
|
|
retval += "mean: %f\n" % self.__mean
|
|
return retval
|
|
|
|
+ def get_max(self):
|
|
+ return self.__max
|
|
+
|
|
def update_max(self, value):
|
|
if value > self.__max:
|
|
self.__max = value
|
|
@@ -416,6 +419,13 @@ class Cyclictest(rtevalModulePrototype):
|
|
if abrt:
|
|
rep_n.addChild(abrt_n)
|
|
|
|
+ # Let the user know if max latency overshot the number of buckets
|
|
+ if self.__cyclicdata["system"].get_max() > self.__buckets:
|
|
+ self._log(Log.ERR, "Max latency(%dus) exceeded histogram range(%dus). Skipping statistics" %
|
|
+ (self.__cyclicdata["system"].get_max(), self.__buckets))
|
|
+ self._log(Log.ERR, "Increase number of buckets to avoid lost samples")
|
|
+ return rep_n
|
|
+
|
|
rep_n.addChild(self.__cyclicdata["system"].MakeReport())
|
|
for thr in self.__cpus:
|
|
if str(thr) not in self.__cyclicdata:
|
|
--
|
|
2.31.1
|
|
|