DevTools: Adding new performance histograms for launch of top 4 tools
This change adds 4 new performance histograms for the DevTools using the prefix 'DevTools.Launch': - DevTools.Launch.Console - DevTools.Launch.Elements - DevTools.Launch.Network - DevTools.Launch.Sources These histograms measure the time between the DevTools window being shown during 'DevToolsWindow::ToggleDevToolsWindow' and a point in each tool that corresponds to the 'ready' state as seen by a user. These end points are unique to each tool but are as follows: - Console: At the end of the ConsolePrompt constructor - Elements: At the end of _updateMetrics when the styles panel has been populated for the initially selected node - Network: After the panel is shown - Sources: After the NetworkNavigatorView has been loaded These tools were chosen as they represent the most popular in terms of usage and will allow us to identify any significant performance impact in the time taken to launch the DevTools when these panels open by default. To see time captured by the histograms in terms of a perf trace for each tool please take a look at the following screenshots: https://imgur.com/a/rcAgQ8h In the traces you can see that the end marker for each load is at the end of the trace near first meaningful paint, and just as the user will see the content of the tool render fully. To accomplish the histograms, a new native function has been added to the DevTools ui bindings/embedder classes called 'recordPerformanceHistogram'. Along with the plumbing and a new helper function in the frontend javascript Host.UserMetrics file called 'panelLoaded' When the frontend javascript loads, it will store the initial panel to be loaded from the preferences. Once that panel has been created and the appropriate loaded marker has been hit, the duration of the launch will be calculated using performance.now(). That duration is then sent to the native code which will fire the appropriate histogram via the 'UMA_HISTOGRAM_TIMES' macros. The mechanism is similar to the existing one used for enumerated histograms and can be expanded to fire additional performance histograms in the future. Also added a new test for user-metrics to ensure that the panelLoaded function will correctly record the histograms. Change-Id: Ib9f0bf80c651231d6d2e308bee36c1a1223f04db Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1506388Reviewed-by:Tom Sepez <tsepez@chromium.org> Reviewed-by:
Ilya Sherman <isherman@chromium.org> Reviewed-by:
Pavel Feldman <pfeldman@chromium.org> Commit-Queue: James Lissiak <jalissia@microsoft.com> Cr-Commit-Position: refs/heads/master@{#644407}
Showing
Please register or sign in to comment