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

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

Issue 8972006: Don't treat warnings as errors when compiling minfrog items. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 9 years 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 try: 9 try:
10 from matplotlib.font_manager import FontProperties 10 from matplotlib.font_manager import FontProperties
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 Args: 50 Args:
51 cmd_list a list of strings that make up the command to run 51 cmd_list a list of strings that make up the command to run
52 outfile a string indicating the name of the file that we should write stdout 52 outfile a string indicating the name of the file that we should write stdout
53 to 53 to
54 append True if we want to append to the file instead of overwriting it""" 54 append True if we want to append to the file instead of overwriting it"""
55 if VERBOSE: 55 if VERBOSE:
56 print ' '.join(cmd_list) 56 print ' '.join(cmd_list)
57 out = subprocess.PIPE 57 out = subprocess.PIPE
58 if outfile: 58 if outfile:
59 mode = 'w' 59 mode = 'w'
60 if append: 60 if append
Siggi Cherem (dart-lang) 2011/12/16 00:24:32 I believe the : should stay on this line?
61 # On Windows, shell must be true to get the correct environment variables.:
61 mode = 'a' 62 mode = 'a'
62 out = open(outfile, mode) 63 out = open(outfile, mode)
63 p = subprocess.Popen(cmd_list, stdout = out, stderr = subprocess.PIPE) 64 p = subprocess.Popen(cmd_list, stdout = out, stderr = subprocess.PIPE)
64 output, not_used = p.communicate(); 65 output, not_used = p.communicate();
65 if output: 66 if output:
66 print output 67 print output
67 return output 68 return output
68 69
69 def TimeCmd(cmd): 70 def TimeCmd(cmd):
70 """Determine the amount of (real) time it takes to execute a given command.""" 71 """Determine the amount of (real) time it takes to execute a given command."""
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 self.trace_file = os.path.join('..', 'tools', 'testing', 'perf_testing', 583 self.trace_file = os.path.join('..', 'tools', 'testing', 'perf_testing',
583 self.result_folder_name, self.result_folder_name + self.cur_time) 584 self.result_folder_name, self.result_folder_name + self.cur_time)
584 585
585 self.AddSvnRevisionToTrace(self.trace_file) 586 self.AddSvnRevisionToTrace(self.trace_file)
586 587
587 elapsed = TimeCmd([os.path.join('.', 'frog.py'), '--', 588 elapsed = TimeCmd([os.path.join('.', 'frog.py'), '--',
588 '--out=minfrog', 'minfrog.dart']) 589 '--out=minfrog', 'minfrog.dart'])
589 RunCmd(['echo', '%f Compiling on Dart VM in production mode in seconds' 590 RunCmd(['echo', '%f Compiling on Dart VM in production mode in seconds'
590 % elapsed], self.trace_file, append=True) 591 % elapsed], self.trace_file, append=True)
591 elapsed = TimeCmd([os.path.join('.', 'minfrog'), '--out=minfrog', 592 elapsed = TimeCmd([os.path.join('.', 'minfrog'), '--out=minfrog',
592 '--warnings_as_errors', 'minfrog.dart', os.path.join('tests', 593 'minfrog.dart', os.path.join('tests', 'hello.dart')])
593 'hello.dart')])
594 if elapsed < self.failure_threshold['Bootstrapping']: 594 if elapsed < self.failure_threshold['Bootstrapping']:
595 #minfrog didn't compile correctly. Stop testing now, because subsequent 595 #minfrog didn't compile correctly. Stop testing now, because subsequent
596 #numbers will be meaningless. 596 #numbers will be meaningless.
597 return 597 return
598 size = os.path.getsize('minfrog') 598 size = os.path.getsize('minfrog')
599 RunCmd(['echo', '%f Bootstrapping time in seconds in production mode' % 599 RunCmd(['echo', '%f Bootstrapping time in seconds in production mode' %
600 elapsed], self.trace_file, append=True) 600 elapsed], self.trace_file, append=True)
601 RunCmd(['echo', '%d Generated checked minfrog size' % size], 601 RunCmd(['echo', '%d Generated checked minfrog size' % size],
602 self.trace_file, append=True) 602 self.trace_file, append=True)
603 603
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 if HasNewCode(): 734 if HasNewCode():
735 RunTestSequence(cl, size, language, perf) 735 RunTestSequence(cl, size, language, perf)
736 else: 736 else:
737 time.sleep(SLEEP_TIME) 737 time.sleep(SLEEP_TIME)
738 else: 738 else:
739 RunTestSequence(cl, size, language, perf) 739 RunTestSequence(cl, size, language, perf)
740 740
741 if __name__ == '__main__': 741 if __name__ == '__main__':
742 main() 742 main()
743 743
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