Skip to contentSkip to conversation

rteval: timerlat: Add --timerlat-interval

PATCH New John Kacur 1 participant 1 message Nov 13, 2024

lore
Share & tools
lore

John Kacur

author
#0 lore raw

PATCH 1/1 rteval: timerlat: Add --timerlat-interval

Add the option --timerlat-interval to the rteval timerlat measurement module.

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

---
 rteval/modules/measurement/timerlat.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
rteval/modules/measurement/timerlat.py +6 -2
index df42777d4a3e..3fcdb5ff2819 100644
@@ -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",
Signature · 1 line
2.47.0