''' Created on May 16, 2011 @author: bungeman ''' import bench_util import getopt import httplib import itertools import json import os import re import sys import urllib import urllib2 import xml.sax.saxutils # We throw out any measurement outside this range, and log a warning. MIN_REASONABLE_TIME = 0 MAX_REASONABLE_TIME = 99999 # Constants for prefixes in output title used in buildbot. TITLE_PREAMBLE = 'Bench_Performance_for_Skia_' TITLE_PREAMBLE_LENGTH = len(TITLE_PREAMBLE) # Number of data points to send to appengine at once. DATA_POINT_BATCHSIZE = 66 def grouper(n, iterable): """Groups list into list of lists for a given size. See itertools doc: http://docs.python.org/2/library/itertools.html#module-itertools """ args = [iter(iterable)] * n return [[n for n in t if n] for t in itertools.izip_longest(*args)] def usage(): """Prints simple usage information.""" print '-a the url to use for adding bench values to app engine app.' print ' Example: "https://skiadash.appspot.com/add_point".' print ' If not set, will skip this step.' print '-b the bench to show.' print '-c the config to show (GPU, 8888, 565, etc).' print '-d a directory containing bench_r_ files.' print '-e file containing expected bench values/ranges.' print ' Will raise exception if actual bench values are out of range.' print ' See bench_expectations.txt for data format and examples.' print '-f [:] the revisions to use for fitting.' print ' Negative is taken as offset from most recent revision.' print '-i