Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests(smokehouse): adjust byte efficiency CPU multiplier #4809

Merged
merged 2 commits into from
Mar 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ class UnusedBytes extends Audit {
*/
static createAuditResult(result, graph) {
const simulatorOptions = PredictivePerf.computeRTTAndServerResponseTime(graph);
// TODO: calibrate multipliers, see https://github.com/GoogleChrome/lighthouse/issues/820
Object.assign(simulatorOptions, {cpuTaskMultiplier: 1, layoutTaskMultiplier: 1});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why reset these multipliers to 1 rather than their defaults?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well in our pre-lantern case the throttling is usually being applied by devtools, so pumping it through another 4x multiplier is sorta unfair. This shouldn't really matter once #4766 and follow-ups land

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aye true. k.

const simulator = new LoadSimulator(graph, simulatorOptions);

const debugString = result.debugString;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe('Byte efficiency base audit', () => {

graph = new NetworkNode(networkRecord);
// add a CPU node to force improvement to TTI
graph.addDependent(new CPUNode({tid: 1, ts: 0, dur: 50 * 1000}));
graph.addDependent(new CPUNode({tid: 1, ts: 0, dur: 100 * 1000}));
});

const baseHeadings = [
Expand Down Expand Up @@ -188,7 +188,7 @@ describe('Byte efficiency base audit', () => {
graph
);

assert.equal(result.rawValue, 420);
assert.equal(result.rawValue, 300);
});
});
});