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

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

Issue 6657034: Added ddtest benchmark. BUG=12445 TEST=ran control.kernel_fs_performance on cr48 (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: Added ddtest Created 9 years, 9 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
« no previous file with comments | « client/tests/ddtest/control ('k') | client/tests/ddtest/ddtest.tar.gz » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1
2 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 import os, shutil, re
7 from autotest_lib.client.bin import utils, test
8
9 class ddtest(test.test):
10 version = 2
11
12
13 def setup(self, tarball='ddtest.tar.gz'):
14 tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir)
15 utils.extract_tarball_to_dir(tarball, self.srcdir)
16 os.chdir(self.srcdir)
17 utils.system('make build')
18
19
20 def initialize(self):
21 self.job.require_gcc()
22 self.results = []
23 self.job.drop_caches_between_iterations = True
24
25
26 def run_once(self, dir=None, blocksize=1024, blocknum=262144, threads=20):
27 if not dir:
28 dir = os.path.join(self.srcdir, 'rdir')
29 shutil.rmtree(dir, True)
30 os.mkdir(dir)
31 args = '-D ' + dir
32 args += ' -b %d' % blocksize
33 args += ' -n %d' % blocknum
34 args += ' -t %d' % threads
35 self.results.append(utils.system_output(os.path.join(self.srcdir,
36 'ddtest') + ' ' + args))
37
38
39 def postprocess(self):
40 pattern = re.compile(r"throughput is (.*?) MB/sec")
41 for throughput in pattern.findall("\n".join(self.results)):
42 self.write_perf_keyval({'throughput':throughput})
OLDNEW
« no previous file with comments | « client/tests/ddtest/control ('k') | client/tests/ddtest/ddtest.tar.gz » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698