GoogleChrome / GoogleChrome/lighthouse

Should networkQuietThresholdMs / pauseAfterLoadMs/... be quietly overridden for non-simulated tests?

Open
#16,796 1 comment 1 reaction 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.