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

Unified Diff: tools/testing/perf_testing/run_perf_tests.py

Issue 10005043: make importing matplotlib optional (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 8 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/testing/browser_README.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/perf_testing/run_perf_tests.py
===================================================================
--- tools/testing/perf_testing/run_perf_tests.py (revision 6287)
+++ tools/testing/perf_testing/run_perf_tests.py (working copy)
@@ -7,8 +7,11 @@
import datetime
import getpass
import math
-from matplotlib.font_manager import FontProperties
-import matplotlib.pyplot as plt
+try:
+ from matplotlib.font_manager import FontProperties
+ import matplotlib.pyplot as plt
+except ImportError:
+ pass # Only needed if we want to make graphs.
import optparse
import os
from os.path import dirname, abspath
@@ -375,7 +378,12 @@
if not afile.startswith('.'):
self.process_file(afile)
- self.plot_results('%s.png' % self.result_folder_name)
+ if 'plt' in globals():
+ # Only run Matplotlib if the
vsm 2012/04/06 18:07:46 Please fix dangling comment.
Emily Fortuna 2012/04/06 18:13:18 Done.
+ self.plot_results('%s.png' % self.result_folder_name)
+ else:
+ print 'Unable to import Matplotlib and therefore unable to generate ' + \
+ 'graphs. Please install it for this version of Python.'
class PerformanceTest(TestRunner):
"""Super class for all performance testing."""
@@ -942,7 +950,7 @@
def run_test_sequence(suites, no_build, graph_only, upload):
# The buildbot already builds and syncs to a specific revision. Don't fight
# with it or replicate work.
- if (not no_build or not graph_only) and sync_and_build() == 1:
+ if not no_build and sync_and_build() == 1:
return # The build is broken.
for test in suites:
« no previous file with comments | « tools/testing/browser_README.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698