diff options
author | Clark Williams <williams@redhat.com> | 2009-11-04 15:07:58 -0600 |
---|---|---|
committer | Clark Williams <williams@redhat.com> | 2009-11-04 15:07:58 -0600 |
commit | 89a85097d9dd24d0a0156b12477a18a5e27bb682 (patch) | |
tree | a26fc875ac1e59f7f8781f5081a92850a03ac2ec /rteval | |
parent | ac1b3f2f393d378ce255b9d3b53fc00c4c800f6a (diff) | |
download | rteval-89a85097d9dd24d0a0156b12477a18a5e27bb682.tar.gz rteval-89a85097d9dd24d0a0156b12477a18a5e27bb682.tar.xz rteval-89a85097d9dd24d0a0156b12477a18a5e27bb682.zip |
add config file sections for cyclictest
Added a config file section for setting parameters used
by cyclictest. Handle two parameters:
buckets: <n> - the number 1us histogram buckets to allocate [2000]
interval: <n> - the polling interval in microseconds [100]
Signed-off-by: Clark Williams <williams@redhat.com>
CC: David Sommerseth <davids@redhat.com>
Diffstat (limited to 'rteval')
-rw-r--r-- | rteval/cyclictest.py | 12 | ||||
-rw-r--r-- | rteval/rteval.conf | 4 | ||||
-rw-r--r-- | rteval/rteval.py | 3 |
3 files changed, 16 insertions, 3 deletions
diff --git a/rteval/cyclictest.py b/rteval/cyclictest.py index 91eda2c..1c6f6f8 100644 --- a/rteval/cyclictest.py +++ b/rteval/cyclictest.py @@ -146,7 +146,7 @@ class RunData(object): class Cyclictest(Thread): def __init__(self, duration=None, priority = 95, outfile = None, threads = None, debugging=False, - keepdata = False): + keepdata = False, params={}): Thread.__init__(self) self.duration = duration self.keepdata = keepdata @@ -157,6 +157,7 @@ class Cyclictest(Thread): self.interval = "-i100" self.debugging = debugging self.reportfile = 'cyclictest.rpt' + self.params = params f = open('/proc/cpuinfo') self.data = {} numcores = 0 @@ -182,7 +183,14 @@ class Cyclictest(Thread): if self.debugging: print "cyclictest: %s" % str def run(self): - self.cmd = ['cyclictest', self.interval, '-a', '-qnm', '-d0', '-h 1000', + if self.params.has_key('buckets'): + buckets = int(self.params.buckets) + else: + buckets = 2000 + if self.params.has_key('interval'): + self.interval = '-i%d' % int(self.params.interval) + + self.cmd = ['cyclictest', self.interval, '-a', '-qnm', '-d0', '-h %d' % buckets, "-p%d" % self.priority] if self.threads: self.cmd.append("-t%d" % self.threads) diff --git a/rteval/rteval.conf b/rteval/rteval.conf index 1b56bb1..6a5ffae 100644 --- a/rteval/rteval.conf +++ b/rteval/rteval.conf @@ -6,6 +6,10 @@ keepdata: True debugging: False duration: 60.0 +[cyclictest] +buckets: 2000 +interval: 100 + [loads] kcompile: module hackbench: module diff --git a/rteval/rteval.py b/rteval/rteval.py index 66b11f7..8d312d7 100644 --- a/rteval/rteval.py +++ b/rteval/rteval.py @@ -505,7 +505,8 @@ class RtEval(object): self.info("setting up cyclictest") self.cyclictest = cyclictest.Cyclictest(duration=self.config.duration, - debugging=self.config.debugging) + debugging=self.config.debugging, + params=self.config.GetSection('cyclictest')) nthreads = 0 try: |