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

Enable CPU throttling (4.5x) #1778

Merged
merged 7 commits into from
Mar 14, 2017
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
2 changes: 1 addition & 1 deletion lighthouse-cli/bin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ Example: --output-path=./lighthouse-results.html`,

// default values
.default('chrome-flags', '')
.default('disable-cpu-throttling', true)
.default('disable-cpu-throttling', false)
.default('output', Printer.GetValidOutputOptions()[Printer.OutputMode.html])
.default('port', 9222)
.default('max-wait-for-load', Driver.MAX_WAIT_FOR_FULLY_LOADED)
Expand Down
3 changes: 1 addition & 2 deletions lighthouse-core/gather/gather-runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,8 @@ class GatherRunner {
return Promise.reject(new Error('You must provide a config'));
}

// CPU throttling is temporarily off by default
if (typeof options.flags.disableCpuThrottling === 'undefined') {
Copy link
Member

Choose a reason for hiding this comment

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

Afaik you can nuke this conditional

options.flags.disableCpuThrottling = true;
options.flags.disableCpuThrottling = false;
}

passes = this.instantiateGatherers(passes, options.config.configDir);
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/lib/emulation.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const NO_CPU_THROTTLE_METRICS = {
rate: 1
};
const CPU_THROTTLE_METRICS = {
rate: 5
rate: 4.5
};

function enableNexus5X(driver) {
Expand Down
3 changes: 0 additions & 3 deletions lighthouse-extension/app/src/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,6 @@ function onGenerateReportButtonClick(background, selectedAggregations) {
.filter(key => !!selectedAggregations[key]);

background.runLighthouseInExtension({
flags: {
disableCpuThrottling: true
},
restoreCleanState: true
}, aggregationIDs).catch(err => {
let message = err.message;
Expand Down