console: profile() static method
MDN Web Docs · نسخهٔ df622a2a1c1e · CC BY-SA 2.5 و مجوز جداگانهٔ ناشر برای نمونهکد
{{APIRef("Console API")}}{{Non-standard_header}} {{AvailableInWorkers}}
The **console.profile()** static method starts recording a performance profile (for example, the Firefox performance tool).
You can optionally supply an argument to name the profile and this then enables you to stop only that profile if multiple profiles being recorded. See {{domxref("console/profileEnd_static", "console.profileEnd()")}} to see how this argument is interpreted.
To stop recording call {{domxref("console/profileEnd_static", "console.profileEnd()")}}.
Syntax
js-nolint
console.profile(profileName)Parameters
profileName{{Optional_Inline}}- : The name to give the profile.
Return value
None ({{jsxref("undefined")}}).
Browser compatibility
{{Compat}}
See also
- {{domxref("console/profileEnd_static", "console.profileEnd()")}}