Skip to content

Commit

Permalink
Enable CPU throttling (4.5x) (#1778)
Browse files Browse the repository at this point in the history
  • Loading branch information
addyosmani authored and paulirish committed Mar 14, 2017
1 parent 338b09e commit ade2d88
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
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') {
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

0 comments on commit ade2d88

Please sign in to comment.