1 of 17

Stats in Chrome

Camillo Bruni / cbruni@chromium.org

Michael Lippautz / mlippautz@chromium.org

2 of 17

Runtime Call Stats

3 of 17

Enter the URL of the page you want to measure in the first tab. Do not load the page yet.

4 of 17

Add a second tab and open

chrome://tracing/

5 of 17

Click on the Record button to prepare recording a trace. First choose Web developer and then select Edit categories.

6 of 17

Make sure to select v8.runtime_stats from the list. Depending on how detailed your investigation is, you may select other categories.

7 of 17

Press Record and switch back to the first tab and load the page. The fastest way is to use CTRL/CMD-1 to directly jump to the first tab and then press ENTER to accept the entered URL.

8 of 17

Wait until your page has completed loading or the buffer is full, then Stop the recording.

9 of 17

Look for a Renderer section that contains the webpage title from the recorded tab and a CrRendererMain section that contains some data on the right hand side.

Select the trace events/slices by pressing SHIFT and dragging. A table with all the selected slices appears at the bottom.

10 of 17

Scroll to the top right of the table and click on the link next to Runtime call stats table.

11 of 17

In the newly appeared view scroll to the bottom to see a detailed table of where V8 spends its time.

12 of 17

By flipping open a category you can further drill down into the data.

13 of 17

Heap Stats

14 of 17

Follow Runtime Call Stats recording steps but make sure to select v8.gc_stats from the list.

15 of 17

Follow the steps of Runtime Call Stats recording for selecting a slice.

Scroll to the top right of the table and click on the link next to V8 GC stats table.

16 of 17

In the newly appeared view scroll to the bottom to see a detailed table of where V8 spends its memory.

Each isolate gets its own stats for each sample.

17 of 17

By flipping open a category you can further drill down into the data.