Webpagetest & lighthouse both combine timeouts after onload and network idle detection (max 2 inflight requests). Lighthouse adds CPU idle time. Lighthouse's implementation can be found at https://github.com/GoogleChrome/lighthouse/blob/master/lighthouse-core/gather/driver.js#L519 Marionette might also have prior art for this with its wait implementation; which might be reusable for our case.
Puppeteer's page.goto method <https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagegotourl-options> (and related methods) has a *waitUntil* option that can be set to either `load` (the default), `domcontentloaded`, `networkidle0` ("consider navigation to be finished when there are no more than 0 network connections for at least 500 ms"), or `networkidle2` ("consider navigation to be finished when there are no more than 2 network connections for at least 500 ms"). Getting Started with Headless Chrome <https://developers.google.com/web/updates/2017/04/headless-chrome#puppeteer> suggests there's also a `networkidle` value, although that documentation may be out-of-date.