GoogleChrome / GoogleChrome/lighthouse
Should networkQuietThresholdMs / pauseAfterLoadMs/... be quietly overridden for non-simulated tests?
- Dominant language
- JavaScript
- Stars
- 30.8k
- Forks
- 9.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 19
Description
Lighthouse ignores wait time thresholds that are lower than the `nonSimulatedSettingsOverrides` if the throttling method is not set to simulate. https://github.com/GoogleChrome/lighthouse/blob/6ca156ba2950a5220f9f2c8468eee88842eff39a/core/config/config.js#L192
```
/**
* Overrides the quiet windows when throttlingMethod requires observation.
*
* @param {LH.Config.Settings} settings
*/
function overrideThrottlingWindows(settings) {
if (settings.throttlingMethod === 'simulate') return;
settings.cpuQuietThresholdMs = Math.max(
settings.cpuQuietThresholdMs || 0,
nonSimulatedSettingsOverrides.cpuQuietThresholdMs
);
settings.networkQuietThresholdMs = Math.max(
settings.networkQuietThresholdMs || 0,
nonSimulatedSettingsOverrides.networkQuietThresholdMs
);
settings.pauseAfterFcpMs = Math.max(
settings.pauseAfterFcpMs || 0,
nonSimulatedSettingsOverrides.pauseAfterFcpMs
);
settings.pauseAfterLoadMs = Math.max(
settings.pauseAfterLoadMs || 0,
nonSimulatedSettingsOverrides.pauseAfterLoadMs
);
}
```
It seems unintuitive that these values are ignored when the user is passing them in through the config, and I've been caught by this several times.
Maybe it's not necessary?
Contributor guide
Assessment
This issue has not been assessed yet.