diff mbox series

rteval: timerlat: Add --timerlat-interval

Message ID 20241113185843.177666-1-jkacur@redhat.com
State New
Headers show
Series rteval: timerlat: Add --timerlat-interval | expand

Commit Message

John Kacur Nov. 13, 2024, 6:58 p.m. UTC
Add the option --timerlat-interval to the rteval timerlat measurement
module.

This corresponds to the --cyclictest-interval in the cyclictest
measurement module.

Signed-off-by: John Kacur <jkacur@redhat.com>
---
 rteval/modules/measurement/timerlat.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/rteval/modules/measurement/timerlat.py b/rteval/modules/measurement/timerlat.py
index df42777d4a3e..3fcdb5ff2819 100644
--- a/rteval/modules/measurement/timerlat.py
+++ b/rteval/modules/measurement/timerlat.py
@@ -226,7 +226,8 @@  class Timerlat(rtevalModulePrototype):
         self._setReady()
 
     def _WorkloadPrepare(self):
-        self.__cmd = ['rtla', 'timerlat', 'hist', '-P', f'f:{int(self.__priority)}', '-u']
+        self.__interval = 'interval' in self.__cfg and f'-p{int(self.__cfg.interval)}' or ""
+        self.__cmd = ['rtla', 'timerlat', 'hist', self.__interval, '-P', f'f:{int(self.__priority)}', '-u']
         self.__cmd.append(f'-c{self.__cpulist}')
         self.__cmd.append(f'-E{self.__buckets}')
 
@@ -499,7 +500,10 @@  class Timerlat(rtevalModulePrototype):
 
 def ModuleParameters():
     """ default parameters """
-    return {"priority": {"descr": "Run rtla timerlat with this priority",
+    return {"interval": {"descr": "Base interval or period of threads in microseconds",
+                         "default": 100,
+                         "metavar": "INTV_US"},
+            "priority": {"descr": "Run rtla timerlat with this priority",
                          "default": 95,
                          "metavar": "PRIO" },
             "buckets":  {"descr": "Number of buckets",