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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « client/tests/ddtest/control ('k') | client/tests/ddtest/ddtest.tar.gz » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/tests/ddtest/ddtest.py
diff --git a/client/tests/ddtest/ddtest.py b/client/tests/ddtest/ddtest.py
new file mode 100755
index 0000000000000000000000000000000000000000..41a48e2219445557fc6b274ff54e0c69fd3b1679
--- /dev/null
+++ b/client/tests/ddtest/ddtest.py
@@ -0,0 +1,42 @@
+
+# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import os, shutil, re
+from autotest_lib.client.bin import utils, test
+
+class ddtest(test.test):
+ version = 2
+
+
+ def setup(self, tarball='ddtest.tar.gz'):
+ tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir)
+ utils.extract_tarball_to_dir(tarball, self.srcdir)
+ os.chdir(self.srcdir)
+ utils.system('make build')
+
+
+ def initialize(self):
+ self.job.require_gcc()
+ self.results = []
+ self.job.drop_caches_between_iterations = True
+
+
+ def run_once(self, dir=None, blocksize=1024, blocknum=262144, threads=20):
+ if not dir:
+ dir = os.path.join(self.srcdir, 'rdir')
+ shutil.rmtree(dir, True)
+ os.mkdir(dir)
+ args = '-D ' + dir
+ args += ' -b %d' % blocksize
+ args += ' -n %d' % blocknum
+ args += ' -t %d' % threads
+ self.results.append(utils.system_output(os.path.join(self.srcdir,
+ 'ddtest') + ' ' + args))
+
+
+ def postprocess(self):
+ pattern = re.compile(r"throughput is (.*?) MB/sec")
+ for throughput in pattern.findall("\n".join(self.results)):
+ self.write_perf_keyval({'throughput':throughput})
« 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