aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/skpbench/parseskpbench.py
diff options
context:
space:
mode:
authorGravatar csmartdalton <csmartdalton@google.com>2016-09-22 05:10:02 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-09-22 05:10:03 -0700
commitd7a9db644496785100c4e61add1c9f8ed0494408 (patch)
tree0ccc969ee1969077f7a7147c470ded84201b16cf /tools/skpbench/parseskpbench.py
parent50537e46e4f0999df0a4707b227000cfa8c800ff (diff)
Add hardware monitoring to skpbench
Adds a Hardware class with hooks for entering and exiting "benchmarking" mode (e.g. locking clocks, etc.) as well as periodic polling of hardware to verify the environment is stable. Adds a partial implementation for generic Android hardware, but ultimately we will need to write specific classes tailored to each unique platform we need to test. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2360473002 Review-Url: https://codereview.chromium.org/2360473002
Diffstat (limited to 'tools/skpbench/parseskpbench.py')
-rwxr-xr-xtools/skpbench/parseskpbench.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/tools/skpbench/parseskpbench.py b/tools/skpbench/parseskpbench.py
index 21f46632df..2481e1d7e1 100755
--- a/tools/skpbench/parseskpbench.py
+++ b/tools/skpbench/parseskpbench.py
@@ -18,7 +18,7 @@ import urllib
import urlparse
import webbrowser
-__argparse = ArgumentParser(description="""
+__argparse = ArgumentParser(description='''
Parses output files from skpbench.py into csv.
@@ -31,21 +31,21 @@ This script can also be used to generate a Google sheet:
(3) Run parseskpbench.py with the --open flag.
-""")
+''')
__argparse.add_argument('-r', '--result',
choices=['median', 'accum', 'max', 'min'], default='median',
- help='result to use for cell values')
+ help="result to use for cell values")
__argparse.add_argument('-f', '--force',
action='store_true', help='silently ignore warnings')
__argparse.add_argument('-o', '--open',
action='store_true',
- help='generate a temp file and open it (theoretically in a web browser)')
+ help="generate a temp file and open it (theoretically in a web browser)")
__argparse.add_argument('-n', '--name',
default='skpbench_%s' % datetime.now().strftime('%Y-%m-%d_%H.%M.%S.csv'),
- help='if using --open, a name for the temp file')
+ help="if using --open, a name for the temp file")
__argparse.add_argument('sources',
- nargs='+', help='source files with skpbench results ("-" for stdin)')
+ nargs='+', help="source files with skpbench results ('-' for stdin)")
FLAGS = __argparse.parse_args()
@@ -67,18 +67,18 @@ class Parser:
if self.metric is None:
self.metric = match.metric
elif match.metric != self.metric:
- raise ValueError('results have mismatched metrics (%s and %s)' %
+ raise ValueError("results have mismatched metrics (%s and %s)" %
(self.metric, match.metric))
if self.samples is None:
self.samples = match.samples
elif not FLAGS.force and match.samples != self.samples:
- raise ValueError('results have mismatched number of samples. '
- '(use --force to ignore)')
+ raise ValueError("results have mismatched number of samples. "
+ "(use --force to ignore)")
if self.sample_ms is None:
self.sample_ms = match.sample_ms
elif not FLAGS.force and match.sample_ms != self.sample_ms:
- raise ValueError('results have mismatched sampling times. '
- '(use --force to ignore)')
+ raise ValueError("results have mismatched sampling times. "
+ "(use --force to ignore)")
if not match.config in self.configs:
self.configs.append(match.config)
self.rows[match.bench][match.config] = match.get_string(FLAGS.result)
@@ -102,7 +102,7 @@ class Parser:
elif FLAGS.force:
outfile.write(',')
else:
- raise ValueError('%s: missing value for %s. (use --force to ignore)' %
+ raise ValueError("%s: missing value for %s. (use --force to ignore)" %
(bench, config))
outfile.write('\n')