Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Side by Side Diff: client/tests/tiobench/tiobench.py

Issue 4823005: Merge remote branch 'cros/upstream' into tempbranch (Closed) Base URL: http://git.chromium.org/git/autotest.git@master
Patch Set: patch Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « client/tests/tiobench/control ('k') | client/tests/tracing_microbenchmark/base_tracer.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 import os 1 import os, logging
2 from autotest_lib.client.bin import test, utils 2 from autotest_lib.client.bin import test, utils
3 3
4 4
5 class tiobench(test.test): 5 class tiobench(test.test):
6 version = 1 6 version = 1
7 7
8 # http://prdownloads.sourceforge.net/tiobench/tiobench-0.3.3.tar.gz 8 # http://prdownloads.sourceforge.net/tiobench/tiobench-0.3.3.tar.gz
9 def setup(self, tarball = 'tiobench-0.3.3.tar.bz2'): 9 def setup(self, tarball = 'tiobench-0.3.3.tar.bz2'):
10 tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) 10 tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir)
11 utils.extract_tarball_to_dir(tarball, self.srcdir) 11 utils.extract_tarball_to_dir(tarball, self.srcdir)
(...skipping 10 matching lines...) Expand all
22 if not dir: 22 if not dir:
23 self.dir = self.tmpdir 23 self.dir = self.tmpdir
24 else: 24 else:
25 self.dir = dir 25 self.dir = dir
26 if not args: 26 if not args:
27 self.args = '--block=4096 --block=8192 --threads=10 --size=1024 --nu mruns=2' 27 self.args = '--block=4096 --block=8192 --threads=10 --size=1024 --nu mruns=2'
28 else: 28 else:
29 self.args = args 29 self.args = args
30 30
31 os.chdir(self.srcdir) 31 os.chdir(self.srcdir)
32 utils.system('./tiobench.pl --dir %s %s' %(self.dir, self.args)) 32 results = utils.system_output('./tiobench.pl --dir %s %s' %
33 (self.dir, self.args))
34
35 logging.info(results)
36 results_path = os.path.join(self.resultsdir,
37 'raw_output_%s' % self.iteration)
38
39 utils.open_write_close(results_path, results)
OLDNEW
« no previous file with comments | « client/tests/tiobench/control ('k') | client/tests/tracing_microbenchmark/base_tracer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698