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

Unified Diff: tools/skpbench/parseskpbench.py

Issue 2360473002: Add hardware monitoring to skpbench (Closed)
Patch Set: Add hardware monitoring to skpbench Created 4 years, 3 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 | « tools/skpbench/_hardware_android.py ('k') | tools/skpbench/skpbench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/skpbench/parseskpbench.py
diff --git a/tools/skpbench/parseskpbench.py b/tools/skpbench/parseskpbench.py
index 21f46632df32b23565dd87dc1e363e7b29aa469a..2481e1d7e17844864ee1644cf9c23bc9055c7387 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')
« no previous file with comments | « tools/skpbench/_hardware_android.py ('k') | tools/skpbench/skpbench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698