diff options
author | David Sommerseth <davids@redhat.com> | 2010-07-08 17:59:47 +0200 |
---|---|---|
committer | David Sommerseth <davids@redhat.com> | 2010-07-08 17:59:47 +0200 |
commit | 9b7d1b7f41da3973424aa9e5decf7cc96a310386 (patch) | |
tree | b9f3f740c858d027b68ae04ed93024d1afe3a509 | |
parent | bf746e32d5f8a3bde1540b89794a048537890a7e (diff) | |
download | rteval-9b7d1b7f41da3973424aa9e5decf7cc96a310386.tar.gz rteval-9b7d1b7f41da3973424aa9e5decf7cc96a310386.tar.xz rteval-9b7d1b7f41da3973424aa9e5decf7cc96a310386.zip |
Updated rteval to use hackbench from rt-tests
Signed-off-by: David Sommerseth <davids@redhat.com>
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | loadsource/hackbench.tar.bz2 | bin | 3361 -> 0 bytes | |||
-rw-r--r-- | rteval-loads.spec | 6 | ||||
-rw-r--r-- | rteval.spec | 16 | ||||
-rw-r--r-- | rteval/hackbench.py | 54 |
5 files changed, 19 insertions, 60 deletions
@@ -34,9 +34,8 @@ PYLIB := $(DESTDIR)$(shell python -c 'import distutils.sysconfig; print distut LOADDIR := loadsource KLOAD := $(LOADDIR)/linux-2.6.26.1.tar.bz2 -HLOAD := $(LOADDIR)/hackbench.tar.bz2 BLOAD := $(LOADDIR)/dbench-4.0.tar.gz -LOADS := $(KLOAD) $(HLOAD) $(BLOAD) +LOADS := $(KLOAD) $(BLOAD) runit: [ -d ./run ] || mkdir run diff --git a/loadsource/hackbench.tar.bz2 b/loadsource/hackbench.tar.bz2 Binary files differdeleted file mode 100644 index 6146c55..0000000 --- a/loadsource/hackbench.tar.bz2 +++ /dev/null diff --git a/rteval-loads.spec b/rteval-loads.spec index c26404e..45f0dd8 100644 --- a/rteval-loads.spec +++ b/rteval-loads.spec @@ -1,13 +1,12 @@ Name: rteval-loads -Version: 1.1 +Version: 1.2 Release: 1%{?dist} Summary: Source files for rteval loads Group: Development/Tools License: GPLv2 URL: http://git.kernel.org/?p=linux/kernel/git/clrkwllms/rteval.git Source0: http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.26.1.tar.bz2 -Source1: hackbench.tar.bz2 -Source2: dbench-4.0.tar.gz +Source1: dbench-4.0.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: rteval >= 1.10 @@ -29,7 +28,6 @@ mkdir -p ${RPM_BUILD_ROOT} mkdir -p ${RPM_BUILD_ROOT}/usr/share/rteval/loadsource install -m 644 %{SOURCE0} ${RPM_BUILD_ROOT}/usr/share/rteval/loadsource install -m 644 %{SOURCE1} ${RPM_BUILD_ROOT}/usr/share/rteval/loadsource -install -m 644 %{SOURCE2} ${RPM_BUILD_ROOT}/usr/share/rteval/loadsource %clean rm -rf ${RPM_BUILD_ROOT} diff --git a/rteval.spec b/rteval.spec index 66bcdf8..63e44a8 100644 --- a/rteval.spec +++ b/rteval.spec @@ -3,7 +3,7 @@ Name: rteval Version: 1.21 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Utility to evaluate system suitability for RT Linux Group: Development/Tools @@ -17,18 +17,18 @@ Requires: python Requires: python-schedutils python-ethtool libxslt-python >= 1.1.17 Requires: python-dmidecode >= 3.10 Requires: rt-tests >= 0.65 -Requires: rteval-loads +Requires: rteval-loads >= 1.2 BuildArch: noarch Obsoletes: rteval <= 1.7 %description -The rteval script is a utility for measuring various aspects of +The rteval script is a utility for measuring various aspects of realtime behavior on a system under load. The script unpacks the -hackbench and kernel source, builds hackbench and then goes into a -loop, running hackbench and compiling a kernel tree. During that loop -the cyclictest program is run to measure event response time. After -the run time completes, a statistical analysis of the event response -times is done and printed to the screen. +kernel source, and then goes into a loop, running hackbench and +compiling a kernel tree. During that loop the cyclictest program +is run to measure event response time. After the run time completes, +a statistical analysis of the event response times is done and printed +to the screen. %prep %setup -q diff --git a/rteval/hackbench.py b/rteval/hackbench.py index 685b8d6..627241f 100644 --- a/rteval/hackbench.py +++ b/rteval/hackbench.py @@ -44,68 +44,29 @@ class Hackbench(load.Load): stdout=null, stderr=null) os.close(null) - def setup(self): - # find our tarball - if self.params.has_key('source'): - self.source = os.path.join(self.srcdir, self.params.source) - if not os.path.exists(self.source): - raise RuntimeError, "hackbench: source %s does not exist!" % self.source - else: - tarfiles = glob.glob(os.path.join(self.srcdir, "hackbench*")) - if len(tarfiles): - self.source = tarfiles[0] - # check for existing directory - self.mydir = os.path.join(self.builddir, "hackbench") - if not os.path.exists(self.mydir): - self.debug("setting up hackbench self.source") - tarargs = ['tar', '-C', self.builddir, '-x'] - if self.source.endswith(".bz2"): - tarargs.append("-j") - elif self.source.endswith(".gz"): - tarargs.append("-z") - tarargs.append("-f") - tarargs.append(self.source) - self.debug("unpacking %s into %s" % (self.source, self.mydir)) - try: - subprocess.call(tarargs) - except: - print "untar'ing hackbench failed!" - sys.exit(-1) - if not os.path.exists(self.mydir): - raise RuntimeError, 'no hackbench directory!' + def setup(self): mult = 1 if self.params.has_key('jobspercore'): mult = int(self.params.jobspercore) self.jobs = self.num_cpus * mult - + def build(self): - self.debug("building") - null = os.open("/dev/null", os.O_RDWR) - # clean up from potential previous run - exe = os.path.join(self.mydir, "hackbench") - if os.path.exists(exe): - os.remove(exe) - subprocess.call(["make", "-C", self.mydir], - stdin=null, stdout=null, stderr=null) - self.debug("built") - self.exe = os.path.join(self.mydir, "hackbench") - if not os.path.exists(self.exe): - raise RuntimeError, "Can't find hackbench executable: %s" % self.exe - self.args = [self.exe, str(self.jobs)] self.ready = True - os.close(null) + def runload(self): + self.args = ['hackbench', '-g', str(self.jobs)] null = os.open("/dev/null", os.O_RDWR) self.debug("starting loop (jobs: %d)" % self.jobs) - p = subprocess.Popen(self.args, stdin=null,stdout=null,stderr=null) + while not self.stopevent.isSet(): + p = subprocess.Popen(self.args, stdin=null, stdout=null) time.sleep(1.0) if p.poll() != None: p.wait() - p = subprocess.Popen(self.args,stdin=null,stdout=null,stderr=null) + self.debug("stopping") if p.poll() == None: os.kill(p.pid, SIGKILL) @@ -113,6 +74,7 @@ class Hackbench(load.Load): self.debug("returning from runload()") os.close(null) + def genxml(self, x): x.taggedvalue('command_line', ' '.join(self.args), {'name':'hackbench'}) |