profile
The profile snippet enables performance monitoring by leveraging the Performance API to track execution timing. It marks key points and measures the elapsed time between them in milliseconds.
Notes
-
The snippet logs performance data as an object when activated.
-
Firefox reduces the precision of timestamps to protect user privacy, which can result in rounded values such as 0 or 1.
Firefox configuration
To obtain more precise measurements in Firefox, navigate to about:config and toggle privacy.reduceTimerPrecision to false. If rounded values persist, toggle privacy.resistFingerprinting as well.
Examples
-
profile; abort-on-property-read atob— activates profiling for property-read monitoring -
profile; debug; abort-on-property-read atob— combines profiling with debug mode