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

Side by Side Diff: tools/testing/perf_testing/create_graph.py

Issue 9677056: Add git svn support to create_graph.py. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 2
3 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 3 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
4 # for details. All rights reserved. Use of this source code is governed by a 4 # for details. All rights reserved. Use of this source code is governed by a
5 # BSD-style license that can be found in the LICENSE file. 5 # BSD-style license that can be found in the LICENSE file.
6 6
7 import datetime 7 import datetime
8 import math 8 import math
9 from matplotlib.font_manager import FontProperties 9 from matplotlib.font_manager import FontProperties
10 import matplotlib.pyplot as plt 10 import matplotlib.pyplot as plt
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 fontP = FontProperties() 269 fontP = FontProperties()
270 fontP.set_size('small') 270 fontP.set_size('small')
271 plt.legend(loc=legend_loc, prop = fontP) 271 plt.legend(loc=legend_loc, prop = fontP)
272 272
273 fig = plt.gcf() 273 fig = plt.gcf()
274 fig.set_size_inches(size_x, size_y) 274 fig.set_size_inches(size_x, size_y)
275 fig.savefig(os.path.join(GRAPH_OUT_DIR, filename)) 275 fig.savefig(os.path.join(GRAPH_OUT_DIR, filename))
276 276
277 def add_svn_revision_to_trace(self, outfile): 277 def add_svn_revision_to_trace(self, outfile):
278 """Add the svn version number to the provided tracefile.""" 278 """Add the svn version number to the provided tracefile."""
279 p = subprocess.Popen(['svn', 'info'], stdout = subprocess.PIPE, 279 p = subprocess.Popen(['svn', 'info'], stdout = subprocess.PIPE,
280 stderr = subprocess.STDOUT, shell = HAS_SHELL) 280 stderr = subprocess.STDOUT, shell = HAS_SHELL)
281 output, not_used = p.communicate() 281 output, not_used = p.communicate()
282 for line in output.split('\n'): 282 for line in output.split('\n'):
283 if 'Revision' in line: 283 if 'Revision' in line:
284 run_cmd(['echo', line.strip()], outfile) 284 run_cmd(['echo', line.strip()], outfile)
285 return
286
287 # If svn did not work, try git svn.
288 p = subprocess.Popen(['git', 'svn', 'info'], stdout = subprocess.PIPE,
289 stderr = subprocess.STDOUT, shell = HAS_SHELL)
290 output, not_used = p.communicate()
291 for line in output.split('\n'):
292 if 'Revision' in line:
293 run_cmd(['echo', line.strip()], outfile)
Emily Fortuna 2012/03/13 18:18:04 This is fine, or pass the list ['svn', 'info'] and
294 return
295
285 296
286 def write_html(self, delimiter, rev_nums, label_1, dict_1, label_2, dict_2, 297 def write_html(self, delimiter, rev_nums, label_1, dict_1, label_2, dict_2,
287 cleanFile=False): 298 cleanFile=False):
288 """Adds an html table to the webpage to display the data values. This method 299 """Adds an html table to the webpage to display the data values. This method
289 will be removed when we have a nicer way to display data values.""" 300 will be removed when we have a nicer way to display data values."""
290 #TODO(efortuna): fix this. 301 #TODO(efortuna): fix this.
291 return 302 return
292 #TODO(efortuna): Take this method out when have finalized where the data is 303 #TODO(efortuna): Take this method out when have finalized where the data is
293 # going to be displayed. 304 # going to be displayed.
294 f = '' 305 f = ''
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
749 while True: 760 while True:
750 if has_new_code(): 761 if has_new_code():
751 run_test_sequence(cl, size, language, perf) 762 run_test_sequence(cl, size, language, perf)
752 else: 763 else:
753 time.sleep(SLEEP_TIME) 764 time.sleep(SLEEP_TIME)
754 else: 765 else:
755 run_test_sequence(cl, size, language, perf) 766 run_test_sequence(cl, size, language, perf)
756 767
757 if __name__ == '__main__': 768 if __name__ == '__main__':
758 main() 769 main()
759
OLDNEW
« 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