OLD | NEW |
1 ''' | 1 ''' |
2 Created on May 16, 2011 | 2 Created on May 16, 2011 |
3 | 3 |
4 @author: bungeman | 4 @author: bungeman |
5 ''' | 5 ''' |
6 import bench_util | 6 import bench_util |
7 import getopt | 7 import getopt |
8 import httplib | 8 import httplib |
9 import itertools | 9 import itertools |
10 import json | 10 import json |
11 import os | 11 import os |
12 import re | 12 import re |
13 import sys | 13 import sys |
14 import urllib | 14 import urllib |
15 import urllib2 | 15 import urllib2 |
16 import xml.sax.saxutils | 16 import xml.sax.saxutils |
17 | 17 |
18 # We throw out any measurement outside this range, and log a warning. | 18 # We throw out any measurement outside this range, and log a warning. |
19 MIN_REASONABLE_TIME = 0 | 19 MIN_REASONABLE_TIME = 0 |
20 MAX_REASONABLE_TIME = 99999 | 20 MAX_REASONABLE_TIME = 99999 |
21 | 21 |
22 # Constants for prefixes in output title used in buildbot. | 22 # Constants for prefixes in output title used in buildbot. |
23 TITLE_PREAMBLE = 'Bench_Performance_for_Skia_' | 23 TITLE_PREAMBLE = 'Bench_Performance_for_' |
24 TITLE_PREAMBLE_LENGTH = len(TITLE_PREAMBLE) | 24 TITLE_PREAMBLE_LENGTH = len(TITLE_PREAMBLE) |
25 | 25 |
26 def usage(): | 26 def usage(): |
27 """Prints simple usage information.""" | 27 """Prints simple usage information.""" |
28 | 28 |
29 print '-a <url> the url to use for adding bench values to app engine app.' | 29 print '-a <url> the url to use for adding bench values to app engine app.' |
30 print ' Example: "https://skiadash.appspot.com/add_point".' | 30 print ' Example: "https://skiadash.appspot.com/add_point".' |
31 print ' If not set, will skip this step.' | 31 print ' If not set, will skip this step.' |
32 print '-b <bench> the bench to show.' | 32 print '-b <bench> the bench to show.' |
33 print '-c <config> the config to show (GPU, 8888, 565, etc).' | 33 print '-c <config> the config to show (GPU, 8888, 565, etc).' |
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 usage() | 482 usage() |
483 sys.exit(2) | 483 sys.exit(2) |
484 | 484 |
485 if not output_path: | 485 if not output_path: |
486 print 'Warning: No output path provided. No graphs will be written.' | 486 print 'Warning: No output path provided. No graphs will be written.' |
487 | 487 |
488 if time_of_interest: | 488 if time_of_interest: |
489 time_to_ignore = None | 489 time_to_ignore = None |
490 | 490 |
491 # The title flag (-l) provided in buildbot slave is in the format | 491 # The title flag (-l) provided in buildbot slave is in the format |
492 # Bench_Performance_for_Skia_<platform>, and we want to extract <platform> | 492 # Bench_Performance_for_<platform>, and we want to extract <platform> |
493 # for use in platform_and_alg to track matching benches later. If title flag | 493 # for use in platform_and_alg to track matching benches later. If title flag |
494 # is not in this format, there may be no matching benches in the file | 494 # is not in this format, there may be no matching benches in the file |
495 # provided by the expectation_file flag (-e). | 495 # provided by the expectation_file flag (-e). |
496 bot = title # To store the platform as bot name | 496 bot = title # To store the platform as bot name |
497 platform_and_alg = title | 497 platform_and_alg = title |
498 if platform_and_alg.startswith(TITLE_PREAMBLE): | 498 if platform_and_alg.startswith(TITLE_PREAMBLE): |
499 bot = platform_and_alg[TITLE_PREAMBLE_LENGTH:] | 499 bot = platform_and_alg[TITLE_PREAMBLE_LENGTH:] |
500 platform_and_alg = bot + '-' + rep | 500 platform_and_alg = bot + '-' + rep |
501 title += ' [representation: %s]' % rep | 501 title += ' [representation: %s]' % rep |
502 | 502 |
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1034 print '<a id="rev_link" xlink:href="" target="_top">' | 1034 print '<a id="rev_link" xlink:href="" target="_top">' |
1035 print '<text id="revision" x="0" y=%s style="' % qa(font_size*2) | 1035 print '<text id="revision" x="0" y=%s style="' % qa(font_size*2) |
1036 print 'font-size: %s; ' % qe(font_size) | 1036 print 'font-size: %s; ' % qe(font_size) |
1037 print 'stroke: #0000dd; text-decoration: underline; ' | 1037 print 'stroke: #0000dd; text-decoration: underline; ' |
1038 print '"> </text></a>' | 1038 print '"> </text></a>' |
1039 | 1039 |
1040 print '</svg>' | 1040 print '</svg>' |
1041 | 1041 |
1042 if __name__ == "__main__": | 1042 if __name__ == "__main__": |
1043 main() | 1043 main() |
OLD | NEW |