Skip to content
Permalink
Browse files
Add the support for reporting Speedometer 2.0 results to perf dashboard
https://bugs.webkit.org/show_bug.cgi?id=182089
<rdar://problem/36172346>

Rubber-stamped by Chris Dumez.

Apparently, this has always worked since the very first version of the perf dashboard added in r163688.
The relevant code is at the line 313 of report-processor.php now.

Added regression tests for this feature since we didn't have any tests four years ago.

* server-tests/api-report-tests.js:


Canonical link: https://commits.webkit.org/198057@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227750 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
rniwa committed Jan 29, 2018
1 parent 34475f1 commit e291a525473ca8a66f4b883b8be15ce9fe5ef199
Showing 2 changed files with 105 additions and 0 deletions.
@@ -1,3 +1,18 @@
2018-01-29 Ryosuke Niwa <rniwa@webkit.org>

Add the support for reporting Speedometer 2.0 results to perf dashboard
https://bugs.webkit.org/show_bug.cgi?id=182089
<rdar://problem/36172346>

Rubber-stamped by Chris Dumez.

Apparently, this has always worked since the very first version of the perf dashboard added in r163688.
The relevant code is at the line 313 of report-processor.php now.

Added regression tests for this feature since we didn't have any tests four years ago.

* server-tests/api-report-tests.js:

2018-01-29 Ryosuke Niwa <rniwa@webkit.org>

REGRESSION(r225898): The perf dashboard fails to open when there are no summary pages
@@ -554,6 +554,96 @@ describe("/api/report", function () {
});
});

it("should be able to compute the aggregation of differently aggregated values", async () => {
const reportWithDifferentAggregators = {
"buildNumber": "123",
"buildTime": "2013-02-28T10:12:03.388304",
"builderName": "someBuilder",
"builderPassword": "somePassword",
"platform": "Mountain Lion",
"tests": {
"DummyBenchmark": {
"metrics": {"Time": ["Arithmetic"]},
"tests": {
"DOM": {
"metrics": {"Time": ["Total"]},
"tests": {
"ModifyNodes": {"metrics": {"Time": { "current": [[1, 2], [3, 4]] }}},
"TraverseNodes": {"metrics": {"Time": { "current": [[11, 12], [13, 14]] }}}
}
},
"CSS": {"metrics": {"Time": { "current": [[21, 22], [23, 24]] }}}
}
}
},
"revisions": {
"macOS": {
"revision": "10.8.2 12C60"
},
"WebKit": {
"revision": "141977",
"timestamp": "2013-02-06T08:55:20.9Z"
}
}};

await reportAfterAddingBuilderAndAggregators(reportWithDifferentAggregators);
const result = await fetchTestRunIterationsForMetric('DummyBenchmark', 'Time');

const run = result.run;
const runId = run['id'];
const expectedIterations = [];
let sum = 0;
let squareSum = 0;
for (let i = 0; i < 4; ++i) {
const value = i + 1;
const DOMTotal = (value + 10 + value);
const expectedValue = (DOMTotal + (20 + value)) / 2;
sum += expectedValue;
squareSum += expectedValue * expectedValue;
expectedIterations.push({run: runId, order: i, group: Math.floor(i / 2), value: expectedValue, relative_time: null});
}
assert.deepEqual(result.iterations, expectedIterations);
assert.equal(run['mean_cache'], sum / result.iterations.length);
assert.equal(run['sum_cache'], sum);
assert.equal(run['square_sum_cache'], squareSum);
});

it("should reject a report when there are more than non-matching aggregators in a subtest", async () => {
const reportWithAmbigiousAggregators = {
"buildNumber": "123",
"buildTime": "2013-02-28T10:12:03.388304",
"builderName": "someBuilder",
"builderPassword": "somePassword",
"platform": "Mountain Lion",
"tests": {
"DummyBenchmark": {
"metrics": {"Time": ["Arithmetic"]},
"tests": {
"DOM": {
"metrics": {"Time": ["Total", "Geometric"]},
"tests": {
"ModifyNodes": {"metrics": {"Time": { "current": [[1, 2], [3, 4]] }}},
"TraverseNodes": {"metrics": {"Time": { "current": [[11, 12], [13, 14]] }}}
}
},
"CSS": {"metrics": {"Time": { "current": [[21, 22], [23, 24]] }}}
}
}
},
"revisions": {
"macOS": {
"revision": "10.8.2 12C60"
},
"WebKit": {
"revision": "141977",
"timestamp": "2013-02-06T08:55:20.9Z"
}
}};

const response = await reportAfterAddingBuilderAndAggregatorsWithResponse(reportWithAmbigiousAggregators);
assert.equal(response['status'], 'NoMatchingAggregatedValueInSubtest');
});

function reportWithSameSubtestName()
{
return {

0 comments on commit e291a52

Please sign in to comment.