Skip to content

Conversation

@patrickhulce
Copy link
Collaborator

Summary
Adds a toplevel warning when BenchmarkIndex is sufficiently low (at least ~2x differential in CPU time) when run from the CLI and settings are the defaults.

This PR also enables markdown links in our toplevel warnings. It seemed particularly relevant to this message to provide a link on how to act on it, but I think it's a good idea to try to make more warnings actionable if the message doesn't already.

image

Related Issues/PRs
finally closes #9085

@patrickhulce patrickhulce requested a review from a team as a code owner August 31, 2020 20:35
@patrickhulce patrickhulce requested review from Beytoven and removed request for a team August 31, 2020 20:35
@connorjclark connorjclark changed the title core(gatherrunner): add warning when BenchmarkIndex is sufficiently low core(gather-runner): add warning when BenchmarkIndex is sufficiently low Sep 1, 2020
@connorjclark connorjclark changed the title core(gather-runner): add warning when BenchmarkIndex is sufficiently low core(gather-runner): warn when BenchmarkIndex is sufficiently low Sep 1, 2020
@patrickhulce patrickhulce assigned paulirish and unassigned Beytoven Sep 2, 2020
@patrickhulce
Copy link
Collaborator Author

@paulirish are you still concerned about your point in #11350 (comment)? Would love to land this if you're cool with it :)

Copy link
Member

@paulirish paulirish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the new benchmark test page that's quick http://melodic-class.glitch.me/benchmark-quick.html

wait isn't this the older ultradumb benchmark?

just ran it on my (plugged in) laptop.. first time:

image

in LH we don't get an average... and the first two times it woulda triggered this warning.

so yes i'm still concerned about this being a little too aggressive.

if our BI function has this much variability, i don't think we can add warnings to the user based on it. :/

Copy link
Member

@paulirish paulirish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wait isn't this the older ultradumb benchmark?

I did just attempt at replacing the benchmark code in here with the new computeBenchmarkIndex ... first coupla runs look like they have a bit less variance... plus i'm not seeing any sub 1200 numbers for my laptop anymore. phew.

@patrickhulce can you repro the wide variance i get with the ultradumb? and that there's less with the new one? if so, how about we start with 1000? and then ~next release raise it to 1200 assuming we haven't pissed off everyone yet

@patrickhulce
Copy link
Collaborator Author

patrickhulce commented Sep 13, 2020

wait isn't this the older ultradumb benchmark?

Ah shoot, sorry yeah I messed with it when trying something with WPT in between when I posted here and now sorry!

https://melodic-class.glitch.me/benchmark-v2-do-not-edit.html should be permanent with the new reminder name to myself to not touch it 😆

@patrickhulce can you repro the wide variance i get with the ultradumb? and that there's less with the new one? if so, how about we start with 1000?

The wide variance (it should really just be bimodal with the value being either in the fast bucket or the roughly half as fast slow bucket) with ultradumb is exactly the problem introduced by Chrome 86 that mandated the new version. I can indeed repro it in every environment. The new BenchmarkIndex definitely had less variability than ultradumb (and the modified ultradumb with lower memory footprint) on all machines I tested due to the lower GC dependence.

if so, how about we start with 1000? and then ~next release raise it to 1200 assuming we haven't pissed off everyone yet

Sure, wfm. My expectation is that all devices that should be using a 2x multiplier instead of 4x multiplier will not be flagged by a cutoff of 1000 unless many other applications are running on their machine (not even the slowest desktop that takes almost 4x longer to execute JS had a BenchmarkIndex of 1000).

lighthouse --throttling.cpuSlowdownMultiplier=6 https://example.com
```

## Slow CPU Warnings in the Lighthouse Report
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this what you were hoping for @paulirish ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i made edits. lots of 'em :)

Copy link
Member

@paulirish paulirish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i went to town on your markdown. 2e76830 (#11350) so you can review my edits.

but aside from that (and the small items below), this is gtg!

lighthouse --throttling.cpuSlowdownMultiplier=6 https://example.com
```

## Slow CPU Warnings in the Lighthouse Report
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i made edits. lots of 'em :)

*/
warningSlowHostCpu: 'The device that ran this test appears to have a slower CPU than ' +
'Lighthouse expects. This can negatively affect your performance score. Learn more about using ' +
'[custom throttling settings](https://github.com/GoogleChrome/lighthouse/blob/master/docs/throttling.md#slow-cpu-warnings-in-the-lighthouse-report) ' +
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Learn more about [calibrating an appropriate CPU slowdown](https://github.com/GoogleChrome/lighthouse/blob/master/docs/throttling.md#cpu-throttling).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve BenchmarkIndex to land device targeting

8 participants