Skip to content

Commit

Permalink
only keep user timing trace change
Browse files Browse the repository at this point in the history
  • Loading branch information
connorjclark committed Apr 25, 2023
1 parent d608b26 commit 1503272
Show file tree
Hide file tree
Showing 5 changed files with 12,545 additions and 32,209 deletions.
27 changes: 13 additions & 14 deletions core/test/audits/mainthread-work-breakdown-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,18 @@ describe('Performance: page execution timings audit', () => {
const output = await PageExecutionTimings.audit(artifacts, {options, computedCache: new Map()});
expect(keyOutput(output)).toMatchInlineSnapshot(`
Object {
"garbageCollection": 15,
"other": 244,
"garbageCollection": 46,
"other": 184,
"paintCompositeRender": 12,
"parseHTML": 60,
"scriptEvaluation": 552,
"scriptParseCompile": 74,
"styleLayout": 65,
"parseHTML": 84,
"scriptEvaluation": 145,
"scriptParseCompile": 38,
"styleLayout": 275,
}
`);
expect(Math.round(output.numericValue)).toMatchInlineSnapshot(`1021`);
expect(Math.round(output.numericValue)).toMatchInlineSnapshot(`784`);
assert.equal(output.details.items.length, 7);
assert.equal(output.score, 0.99);
expect(output.score).toMatchInlineSnapshot(`1`);
});

it('should compute the correct values for the load trace (legacy)', async () => {
Expand All @@ -111,15 +111,14 @@ Object {
const output = await PageExecutionTimings.audit(artifacts, {options, computedCache: new Map()});
expect(keyOutput(output)).toMatchInlineSnapshot(`
Object {
"other": 46,
"paintCompositeRender": 44,
"parseHTML": 1,
"scriptEvaluation": 7,
"other": 28,
"parseHTML": 2,
"scriptEvaluation": 1,
"scriptParseCompile": 1,
"styleLayout": 86,
"styleLayout": 35,
}
`);
expect(Math.round(output.numericValue)).toMatchInlineSnapshot(`184`);
expect(Math.round(output.numericValue)).toMatchInlineSnapshot(`67`);
assert.equal(output.details.items.length, 6);
assert.equal(output.score, 1);
});
Expand Down
4 changes: 2 additions & 2 deletions core/test/audits/metrics/interactive-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ describe('Performance: interactive audit', () => {

const context = getFakeContext({formFactor: 'mobile', throttlingMethod: 'provided'});
return Interactive.audit(artifacts, context).then(output => {
assert.equal(output.score, 1);
assert.equal(Math.round(output.numericValue), 2712);
expect(output.score).toMatchInlineSnapshot(`0.97`);
expect(output.numericValue).toMatchInlineSnapshot(`2711.939`);
expect(output.displayValue).toBeDisplayString('2.7\xa0s');
});
});
Expand Down
Loading

0 comments on commit 1503272

Please sign in to comment.