maxedison
maxedison

Reputation: 17553

Using performance.mark() with Chrome dev tools performance tab

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?

Upvotes: 33

Views: 10111

Answers (2)

Zoltán Dobrovolni
Zoltán Dobrovolni

Reputation: 356

Currently you can find in Performance tab -> Timings Loading Program is the measured timeline

Upvotes: 1

aliry
aliry

Reputation: 822

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');

Upvotes: 67

Related Questions