summaryrefslogtreecommitdiffstats
path: root/rteval
diff options
context:
space:
mode:
authorClark Williams <williams@redhat.com>2010-07-09 12:52:49 -0500
committerClark Williams <williams@redhat.com>2010-07-09 12:52:49 -0500
commiteb781acb57ed79edd82ac531ed48b0c6fff7f671 (patch)
tree8feb2a09cea5695dfc9576e66cc51462c22e54a4 /rteval
parenta7e9f9f3999ea400a00ff4be860745a27e38b882 (diff)
downloadrteval-eb781acb57ed79edd82ac531ed48b0c6fff7f671.tar.gz
rteval-eb781acb57ed79edd82ac531ed48b0c6fff7f671.tar.xz
rteval-eb781acb57ed79edd82ac531ed48b0c6fff7f671.zip
modified hackbench arguments to deal with new hackbench
Added parameters to rteval.conf and changed logic in hackbench.py to deal with the behavior and new capabilities of the new hackbench executable we're using. Signed-off-by: Clark Williams <williams@redhat.com>
Diffstat (limited to 'rteval')
-rw-r--r--rteval/hackbench.py23
-rw-r--r--rteval/rteval.conf4
2 files changed, 17 insertions, 10 deletions
diff --git a/rteval/hackbench.py b/rteval/hackbench.py
index 968e027..0ea8e46 100644
--- a/rteval/hackbench.py
+++ b/rteval/hackbench.py
@@ -44,20 +44,26 @@ class Hackbench(load.Load):
stdout=null, stderr=null)
os.close(null)
-
def setup(self):
- mult = 1
- if self.params.has_key('jobspercore'):
- mult = int(self.params.jobspercore)
+ 'calculate arguments based on input parameters'
+ mult = int(self.params.setdefault('jobspercore', 2))
self.jobs = self.num_cpus * mult
-
+ self.datasize = self.params.setdefault('datasize', '1024')
+ self.workunit = self.params.setdefault('workunit', 'thread')
+ if self.workunit.startswith('thread'):
+ workarg = '-T'
+ else:
+ workarg = '-P'
+ self.args = ['hackbench', workarg,
+ '-g', str(self.jobs),
+ '-l', str(self.num_cpus * 256),
+ '-s', self.datasize,
+ ]
def build(self):
self.ready = True
-
def runload(self):
- self.args = ['hackbench', '-g', str(self.jobs)]
null = os.open("/dev/null", os.O_RDWR)
if self.logging:
out = self.open_logfile("hackbench.stdout")
@@ -67,11 +73,10 @@ class Hackbench(load.Load):
self.debug("starting loop (jobs: %d)" % self.jobs)
while not self.stopevent.isSet():
- p = subprocess.Popen(self.args, stdin=out, stdout=err)
+ p = subprocess.Popen(self.args, stdin=out, stdout=out, stderr=err)
time.sleep(1.0)
if p.poll() != None:
p.wait()
-
self.debug("stopping")
if p.poll() == None:
os.kill(p.pid, SIGKILL)
diff --git a/rteval/rteval.conf b/rteval/rteval.conf
index e0e0201..2f06cb2 100644
--- a/rteval/rteval.conf
+++ b/rteval/rteval.conf
@@ -20,7 +20,9 @@ jobspercore: 2
[hackbench]
source: hackbench.tar.bz2
-jobspercore: 5
+jobspercore: 2
+datasize: 1024
+workunit: thread
[dbench]
source: dbench.tar.gz