You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Run this with deno run --inspect-brk main.ts
export async function slow_add(a: number, b: number): Promise<number> {
for (let i = 0; i < 100; i++) {
let slow_to_compute = Array(100000)
.fill(42)
.map((_, i) => Math.sqrt(i ** 2 + 1))
.reduce((a, b) => a + b, 0);
await new Promise((resolve) => setTimeout(() => resolve(undefined), 100));
}
return a + b;
}
// Learn more at https://docs.deno.com/runtime/manual/examples/module_metadata#concepts
if (import.meta.main) {
console.profile();
console.log("Add 2 + 3 =", await slow_add(2, 3));
console.profileEnd();
}
Can you link to any release notes, bugs, pull requests, or MDN pages related to this?
What type of issue is this?
Incorrect support data (example: BrowserX says "86" but support was added in "40")
What information was incorrect, unhelpful, or incomplete?
Deno supports
console.profile()
andconsole.profileEnd()
, which they implemented while getting their Node.js compatibility down https://docs.deno.com/api/node/console/~/Console.profileWhat browsers does this problem apply to, if applicable?
Deno
What did you expect to see?
I expected to see it marked as supported.
Did you test this? If so, how?
I followed the steps at https://docs.deno.com/runtime/fundamentals/debugging/ , and added a
console.profile
to my code.Can you link to any release notes, bugs, pull requests, or MDN pages related to this?
No response
Do you have anything more you want to share?
No response
MDN URL
https://developer.mozilla.org/en-US/docs/Web/API/console/profile_static
MDN metadata
MDN page report details
api.console.profile_static
The text was updated successfully, but these errors were encountered: