Skip to main content
method Console.profile
Console.profile(label?: string): void
Deprecated

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

optional
label: string

Return Type

void
Back to top