def filter(self, testname, filters): """ filter the results set; applies each of the filters in order to the results data filters should be callables that take a list the last filter should return a scalar (float or int) returns a list of [[data, page], ...] """ retval = [] for result in self.results: page = result['page'] data = result['runs'] remaining_filters = [] # ignore* functions return a filtered set of data for f in filters: if f.func.__name__.startswith('ignore'): data = f.apply(data) else: remaining_filters.append(f) # calculate common numbers with the raw data data_summary = { 'min': min(data), 'max': max(data), 'mean': filter.mean(data), 'median': filter.median(data), 'std': filter.stddev(data) } # apply the summarization filters for f in remaining_filters: if f.func.__name__ == "v8_subtest": # for v8_subtest we need to page for reference data data = filter.v8_subtest(data, page) else: data = f.apply(data) data_summary['filtered'] = data # special case for dromaeo_dom and v8_7 if testname == 'dromaeo_dom' or testname.startswith('v8_7'): data_summary['value'] = data retval.append([data_summary, page]) return retval
def filter(self, testname, filters): """ filter the results set; applies each of the filters in order to the results data filters should be callables that take a list the last filter should return a scalar (float or int) returns a list of [[data, page], ...] """ retval = [] for result in self.results: page = result['page'] data = result['runs'] remaining_filters = [] # ignore* functions return a filtered set of data for f in filters: if f.func.__name__.startswith('ignore'): data = f.apply(data) else: remaining_filters.append(f) # apply the summarization filters for f in remaining_filters: if f.func.__name__ == "v8_subtest": # for v8_subtest we need to page for reference data data = filter.v8_subtest(data, page) else: data = f.apply(data) summary = { 'filtered': data, # for backwards compatibility with perfherder 'value': data } retval.append([summary, page]) return retval
def filter(self, testname, filters): """ filter the results set; applies each of the filters in order to the results data filters should be callables that take a list the last filter should return a scalar (float or int) returns a list of [[data, page], ...] """ retval = [] for result in self.results: page = result['page'] data = result['runs'] remaining_filters = [] # ignore* functions return a filtered set of data for f in filters: if f.func.__name__.startswith('ignore'): data = f.apply(data) else: remaining_filters.append(f) # apply the summarization filters for f in remaining_filters: if f.func.__name__ == "v8_subtest": # for v8_subtest we need to page for reference data data = filter.v8_subtest(data, page) else: data = f.apply(data) summary = { 'filtered': data, # backward compatibility with perfherder 'value': data } retval.append([summary, page]) return retval