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

Unified Diff: bench/bench_graph_svg.py

Issue 12543019: Make graph output optional in bench_graphs_svg (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/bench_graph_svg.py
===================================================================
--- bench/bench_graph_svg.py (revision 8070)
+++ bench/bench_graph_svg.py (working copy)
@@ -54,7 +54,7 @@
print '-l <title> title to use for the output graph'
print '-m <representation> representation of bench value.'
print ' See _ListAlgorithm class in bench_util.py.'
- print '-o <path> path to which to write output; writes to stdout if not specified'
+ print '-o <path> path to which to write output.'
print '-r <revision>[:<revision>] the revisions to show.'
print ' Negative <revision> is taken as offset from most recent revision.'
print '-s <setting>[=<value>] a setting to show (alpha, scalar, etc).'
@@ -332,6 +332,7 @@
bench_of_interest = None
time_of_interest = None
time_to_ignore = None
+ output_path = None
bench_expectations = {}
appengine_url = None # used for adding data to appengine datastore
rep = None # bench representation algorithm
@@ -462,7 +463,8 @@
elif option == "-m":
rep = value
elif option == "-o":
- redirect_stdout(value)
+ output_path = value
+ redirect_stdout(output_path)
elif option == "-r":
revision_range = value
elif option == "-s":
@@ -486,6 +488,9 @@
usage()
sys.exit(2)
+ if not output_path:
+ print 'Warning: No output path provided. No graphs will be written.'
+
if time_of_interest:
time_to_ignore = None
@@ -532,14 +537,17 @@
, oldest_regression
, newest_regression)
- output_xhtml(lines, oldest_revision, newest_revision, ignored_revision_data_points,
- regressions, requested_width, requested_height, title)
+ if output_path:
+ output_xhtml(lines, oldest_revision, newest_revision,
+ ignored_revision_data_points, regressions, requested_width,
+ requested_height, title)
if appengine_url:
write_to_appengine(lines, appengine_url, newest_revision, bot)
- check_expectations(lines, bench_expectations, newest_revision,
- platform_and_alg)
+ if bench_expectations:
+ check_expectations(lines, bench_expectations, newest_revision,
+ platform_and_alg)
def qa(out):
"""Stringify input and quote as an xml attribute."""
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698