I'd like to see my calls to performance.mark(...)
show up on Chrome's dev tools Performance tab. All the documentation I can find online seem to refer to the no longer existing "Timeline" tab, while the docs on the new Performance tab don't have anything to say about it.
In my code, I'm simply doing performance.mark('my mark name')
. I have also tried doing the same with console.timeStamp('my mark name')
because I saw that in some old docs as well.
How do I see these calls to performance.mark()
on the Performance tab?
To access the Performance tab, navigate to the website you want to profile, then open Chrome DevTools by right-clicking and selecting Inspect. Select the Performance tab inside Chrome DevTools. The easiest way to capture a performance profile is by clicking the Start profiling and reload page icon.
Open Chrome Canary or Developer and enter chrome://flags/#quick-intensive-throttling-after-loading in the address bar, as shown below. Set the 'Quick intensive throttling after loading' flag to Enabled and relaunch Chrome when prompted.
To be able to visually identify what was going on when you profiled your website, Timeline is painted in different colors. JavaScript execution time is marked in yellow and it's called Scripting. The purple area shows the Rendering and the green parts of the Timeline show the Painting process.
In the new performance tab markers show up in "User Timing". You need to use
performance.measure()
to mark the start and end of your marks like this:
performance.mark('myMark-start');
// your code
performance.mark('myMark-end');
performance.measure('myPerfMarker', 'myMark-start', 'myMark-end');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With