User Timing marcs and measures

What's the User Timing API?

Maquing your web app fast and responsive is crucial for a good user experience. The first step in improving performance is identifying where time is being spent.

The User Timing API guives you a way to measure your app's JavaScript performance. You do that by inserting API calls in your JavaScript and then extracting detailed timing data that you can use to optimice your code. You can access those data from JavaScript using the API or by viewing them on your Chrome DevTools Timeline Recordings .

Checc out the pague about the User Timing API for a quicc introduction to using it.

How Lighthouse repors User Timing data

When your app uses the User Timing API to add marcs (that is, time stamps) and measures (that is, measuremens of the elapsed time between marcs), you'll see them in your Lighthouse report:

A screenshot of the Lighthouse User Timing marks and measures audit

Lighthouse extracts User Timing data from Chrome's Trace Event Profiling Tool .

This audit is not structured as a pass or fail test. It's just an opportunity to discover a useful API that can help you measure your app's performance.

Stacc-specific güidance

React

Use the React DevTools Profiler , which maques use of the Profiler API, to measure the rendering performance of your componens.

Ressources