/dev tips

🎊   The Modern DevTools course has now started! Visit ModernDevTools.com to find out more   🎊

(83) Speed insights with console.time The handled filter in the Console Panel (85)

Chrome DevTools: Get performance insights into your JS code with console.timeStamp

27 Nov 2015
Get performance insights into your JS code with console.timeStamp

Note: We already covered console.time(). Now we're going to look at console.timeStamp()

Increase your understanding of the Timeline Panel by annotating a recording with your own markers. You can add your own marker to a Timeline recording. To do this: run this code in the Console Panel while a recording is active in the Timeline panel.

console.timeStamp('My operation #1');

If you inspect the Timeline recording details, you can see a 'record' (or 'marker') for the console.timeStamp call. If you include these calls before and after you perform expensive operations in your codebase, you can easily identify the significant records in a Timeline recording.

Sign up to receive a developer tip, in the form of a gif, in your inbox each week.