| 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))
|
|
|