Make performance bar highlight bad performance
The performance bar is currently very neutral: it shows you what happens, with plenty of information, but it doesn't tell you if that's good or bad. I think we should make it more helpful to developers, users, and instance administrators by highlighting known poor performance.
Timings are hard to set benchmarks for here, but counts are not. We could, for example, look for:
- More than N DB, Gitaly, or Redis calls on a page. We had a limit of 100 for DB queries set in !16466 (merged), but I think it would be more visible in the performance bar if it was, say, bright yellow.
- Repeated calls with the same 'query'. We have those for all three external resources we track, so the frontend can compute this itself.
- The same bad patterns in AJAX requests. Right now those are hidden, because you have to go looking at the AJAX request from the dropdown. We could highlight them in the request selector - and the request selector itself! - when we detect these patterns in the response data.