From: Punit Agrawal <punitagrawal@gmail.com>
To: John Kacur <jkacur@redhat.com>
Cc: linux-rt-users@vger.kernel.org,
Punit Agrawal <punit1.agrawal@toshiba.co.jp>
Subject: Re: [PATCH v3 4/4] rteval: cyclictest.py: Skip statistics reporting in case of an overflow
Date: Mon, 01 Nov 2021 16:40:28 +0900 [thread overview]
Message-ID: <87fssg9vdf.fsf@stealth> (raw)
In-Reply-To: <616c492a-c710-a8b-ff20-832a2816f14e@redhat.com> (John Kacur's message of "Wed, 27 Oct 2021 19:29:18 -0400 (EDT)")
Hi John,
John Kacur <jkacur@redhat.com> writes:
> On Mon, 18 Oct 2021, Punit Agrawal wrote:
>
>> From: Punit Agrawal <punit1.agrawal@toshiba.co.jp>
>>
>> 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 the user to rerun the measurement.
>>
>> Signed-off-by: Punit Agrawal <punit1.agrawal@toshiba.co.jp>
>> ---
>> 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 50a734c75047..7a619dd1c852 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
>> @@ -423,6 +426,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.33.0
>>
>>
> Signed-off-by: John Kacur <jkacur@redhat.com>
Thank you for picking this and other patches in the set.
Let me know if you had any comments on the first patch.
Thanks,
Punit
prev parent reply other threads:[~2021-11-01 7:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-18 5:57 [PATCH v3 0/4] rteval: Fix issues with cyclictest module Punit Agrawal
2021-10-18 5:57 ` [PATCH v3 1/4] rteval: cyclictest.py Enable logging cyclictest output Punit Agrawal
2021-11-09 7:02 ` Punit Agrawal
2021-10-18 5:57 ` [PATCH v3 2/4] rteval: cyclictest.py Parse max latencies from " Punit Agrawal
2021-10-27 23:28 ` John Kacur
2021-10-18 5:57 ` [PATCH v3 3/4] rteval: cyclictest.py: Sort the list of cpus Punit Agrawal
2021-10-27 23:28 ` John Kacur
2021-10-18 5:57 ` [PATCH v3 4/4] rteval: cyclictest.py: Skip statistics reporting in case of an overflow Punit Agrawal
2021-10-27 23:29 ` John Kacur
2021-11-01 7:40 ` Punit Agrawal [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fssg9vdf.fsf@stealth \
--to=punitagrawal@gmail.com \
--cc=jkacur@redhat.com \
--cc=linux-rt-users@vger.kernel.org \
--cc=punit1.agrawal@toshiba.co.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox