Skip to main content

profile

method Console.profile
Jump to headingConsole.profile(label?: string): void

This method does not display anything unless used in the inspector. The console.profile() method starts a JavaScript CPU profile with an optional label until profileEnd is called. The profile is then added to the Profile panel of the inspector.

console.profile('MyLabel');
// Some code
console.profileEnd('MyLabel');
// Adds the profile 'MyLabel' to the Profiles panel of the inspector.

Parameters Jump to heading

optional
Jump to headinglabel: string

Return Type Jump to heading

void
Back to top