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

Unified Diff: slave/skia_slave_scripts/run_nanobench.py

Issue 393593003: Run nanobench on perf bots. (Closed) Base URL: https://skia.googlesource.com/buildbot@master
Patch Set: list binary Created 6 years, 5 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
Index: slave/skia_slave_scripts/run_nanobench.py
diff --git a/slave/skia_slave_scripts/run_nanobench.py b/slave/skia_slave_scripts/run_nanobench.py
new file mode 100644
index 0000000000000000000000000000000000000000..6003a98f5c9bad6ea909d3bad7762e87e7fcbbe4
--- /dev/null
+++ b/slave/skia_slave_scripts/run_nanobench.py
@@ -0,0 +1,36 @@
+#!/usr/bin/env python
+# Copyright (c) 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""Run the Skia benchmarking executable."""
+
+import os
+import sys
+
+from build_step import BuildStep
+from utils import gclient_utils
+
+class RunNanobench(BuildStep):
+ """A BuildStep that runs nanobench."""
+
+ def __init__(self, timeout=9600, no_output_timeout=9600, **kwargs):
+ super(RunNanobench, self).__init__(timeout=timeout,
+ no_output_timeout=no_output_timeout,
+ **kwargs)
+
+ def _JSONPath(self):
+ git_timestamp = gclient_utils.GetGitRepoPOSIXTimestamp()
+ return os.path.join(
+ self._device_dirs.PerfDir(),
+ 'nanobench_%s_%s.json' % ( self._got_revision, git_timestamp))
+
+ def _Run(self):
+ args = ['-i', self._device_dirs.ResourceDir()]
+ if self._perf_data_dir:
+ args.extend(['--outResultsFile', self._JSONPath()])
+ self._flavor_utils.RunFlavoredCmd('nanobench', args)
+
+
+if '__main__' == __name__:
+ sys.exit(BuildStep.RunBuildStep(RunNanobench))

Powered by Google App Engine
This is Rietveld 408576698