зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1425058 - summarize stylebench scores properly. r=rwood,emilio
This commit is contained in:
Родитель
09c3834e23
Коммит
a78be3d8cb
|
@ -255,6 +255,23 @@ class Output(object):
|
||||||
score = 60 * 1000 / filter.geometric_mean(results) / correctionFactor
|
score = 60 * 1000 / filter.geometric_mean(results) / correctionFactor
|
||||||
return score
|
return score
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def stylebench_score(cls, val_list):
|
||||||
|
"""
|
||||||
|
stylebench_score: https://bug-172968-attachments.webkit.org/attachment.cgi?id=319888
|
||||||
|
"""
|
||||||
|
correctionFactor = 3
|
||||||
|
results = [i for i, j in val_list]
|
||||||
|
# stylebench has 4 tests, each of these are made of up 12 subtests
|
||||||
|
# and a sum of the 12 values. We receive 52 values, and want to use
|
||||||
|
# the 4 test values, not the sub test values.
|
||||||
|
if len(results) != 52:
|
||||||
|
raise Exception("StyleBench has 52 subtests, found: %s instead" % len(results))
|
||||||
|
|
||||||
|
results = results[12::13]
|
||||||
|
score = 60 * 1000 / filter.geometric_mean(results) / correctionFactor
|
||||||
|
return score
|
||||||
|
|
||||||
def construct_results(self, vals, testname):
|
def construct_results(self, vals, testname):
|
||||||
if 'responsiveness' in testname:
|
if 'responsiveness' in testname:
|
||||||
return filter.responsiveness_Metric([val for (val, page) in vals])
|
return filter.responsiveness_Metric([val for (val, page) in vals])
|
||||||
|
@ -264,6 +281,8 @@ class Output(object):
|
||||||
return self.JS_Metric(vals)
|
return self.JS_Metric(vals)
|
||||||
elif testname.startswith('speedometer'):
|
elif testname.startswith('speedometer'):
|
||||||
return self.speedometer_score(vals)
|
return self.speedometer_score(vals)
|
||||||
|
elif testname.startswith('stylebench'):
|
||||||
|
return self.stylebench_score(vals)
|
||||||
elif len(vals) > 1:
|
elif len(vals) > 1:
|
||||||
return filter.geometric_mean([i for i, j in vals])
|
return filter.geometric_mean([i for i, j in vals])
|
||||||
else:
|
else:
|
||||||
|
|
Загрузка…
Ссылка в новой задаче