I have written some custom audits following examples here: https://github.com/GoogleChrome/lighthouse/tree/master/docs/recipes/custom-audit
Earlier lighthouse used to give enough time to my app such that I was able to set the custom load metrics in window object. If I remember correctly, I read somewhere that it will wait for the last API call to finish and then run the audits.
However, after having migrated to 3.0.2, it is killing my app too soon. The max-wait-for-load is also not being honored. Due to this, all my custom audits are failing. Please help!
Hey @sakshij thanks for filing!
If your audits require extra time you can increase the config setting for the defaultPass pauseAfterLoadMs.
Example: lighthouse --config-path=./example-config.js <url>
module.exports = {
extends: 'lighthouse:default',
// wait at least 10s after the page has loaded
passes: [{passName: 'defaultPass', pauseAfterLoadMs: 10000}],
};
max-wait-for-load, OTOH, is for the maximum amount of time to wait, not the minimum so you can probably remove that from your setup :)
It worked perfectly! Thanks :)
Most helpful comment
Hey @sakshij thanks for filing!
If your audits require extra time you can increase the config setting for the defaultPass
pauseAfterLoadMs.Example:
lighthouse --config-path=./example-config.js <url>example-config.js
max-wait-for-load, OTOH, is for the maximum amount of time to wait, not the minimum so you can probably remove that from your setup :)