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

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

Issue 3554003: Merge remote branch 'cros/upstream' into tempbranch3 (Closed) Base URL: http://git.chromium.org/git/autotest.git
Patch Set: Created 10 years, 2 months 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
OLDNEW
1 import os, re 1 import os, re
2 from autotest_lib.client.bin import test, os_dep, utils 2 from autotest_lib.client.bin import test, os_dep, utils
3 3
4 4
5 def convert_size(values): 5 def convert_size(values):
6 values = values.split(':') 6 values = values.split(':')
7 size = values[0] 7 size = values[0]
8 if len(values) > 1: 8 if len(values) > 1:
9 chunk = values[1] 9 chunk = values[1]
10 else: 10 else:
(...skipping 20 matching lines...) Expand all
31 self.results = [] 31 self.results = []
32 32
33 # http://www.coker.com.au/bonnie++/bonnie++-1.03a.tgz 33 # http://www.coker.com.au/bonnie++/bonnie++-1.03a.tgz
34 def setup(self, tarball = 'bonnie++-1.03a.tgz'): 34 def setup(self, tarball = 'bonnie++-1.03a.tgz'):
35 tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) 35 tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir)
36 utils.extract_tarball_to_dir(tarball, self.srcdir) 36 utils.extract_tarball_to_dir(tarball, self.srcdir)
37 os.chdir(self.srcdir) 37 os.chdir(self.srcdir)
38 38
39 os_dep.command('g++') 39 os_dep.command('g++')
40 utils.system('patch -p1 < ../bonnie++-1.03a-gcc43.patch') 40 utils.system('patch -p1 < ../bonnie++-1.03a-gcc43.patch')
41 utils.system('./configure') 41 utils.configure()
42 utils.system('make') 42 utils.make()
43 43
44 44
45 def run_once(self, dir=None, extra_args='', user='root'): 45 def run_once(self, dir=None, extra_args='', user='root'):
46 if not dir: 46 if not dir:
47 dir = self.tmpdir 47 dir = self.tmpdir
48 48
49 # if the user specified a -n we will use that 49 # if the user specified a -n we will use that
50 if '-n' not in extra_args: 50 if '-n' not in extra_args:
51 extra_args += ' -n 2048' 51 extra_args += ' -n 2048'
52 args = '-d ' + dir + ' -u ' + user + ' ' + extra_args 52 args = '-d ' + dir + ' -u ' + user + ' ' + extra_args
(...skipping 19 matching lines...) Expand all
72 'randcreate_delete_ksec', 'randcreate_delete_pctcp') 72 'randcreate_delete_ksec', 'randcreate_delete_pctcp')
73 73
74 for line in self.results: 74 for line in self.results:
75 if line.count(',') != 26: 75 if line.count(',') != 26:
76 continue 76 continue
77 fields = line.split(',') 77 fields = line.split(',')
78 fields = [strip_plus(f) for f in fields] 78 fields = [strip_plus(f) for f in fields]
79 fields = convert_size(fields[1]) + fields[2:] 79 fields = convert_size(fields[1]) + fields[2:]
80 80
81 self.write_perf_keyval(dict(zip(keys,fields))) 81 self.write_perf_keyval(dict(zip(keys,fields)))
OLDNEW
« no previous file with comments | « client/tests/bash_shared_mapping/bash_shared_mapping.py ('k') | client/tests/cerberus/cerberus.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698