Be able to change the threshold for janks measurement
Currently this threshold is hardcoded in https://github.com/devtools-html/perf.html/blob/c8801086a711b0fff7e0d87bb88b8ebfa57c620d/src/reducers/profile-view.js#L607.
We should provide an UI to change this, as different users have different requirements. 50ms is good for events like click, but not good enough to debug smooth CSS animations, or scrolling, or rendering 3D in a canvas.
Here are several possibilities I can think of:
- have several hardcoded values we can choose: 50, 32, 16, 11.
- something like input type=range to define the threshold value
- same to define the intended fps, from which we'd derive the threshold (1/fps).
Of course this would need to be persisted in the URL.
I don't have a good idea of where to put this UI.
┆Issue is synchronized with this Jira Task
Just finding a place to display the "50ms" value so that the red jank bars feel less like magic for people discovering the profiler would already be an improvement.
With the new responsiveness tracks, it might be easier to access this information now.
I believe we had it before just fine.