Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api.console.profile_static - Deno now supports it #25022

Open
stefnotch opened this issue Nov 10, 2024 · 0 comments
Open

api.console.profile_static - Deno now supports it #25022

stefnotch opened this issue Nov 10, 2024 · 0 comments
Labels
data:api 🐇 Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API

Comments

@stefnotch
Copy link
Contributor

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() and console.profileEnd(), which they implemented while getting their Node.js compatibility down https://docs.deno.com/api/node/console/~/Console.profile

What 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.

// 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?

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
  • Query: api.console.profile_static
  • Report started: 2024-11-10T17:34:11.034Z
@queengooborg queengooborg added the data:api 🐇 Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API label Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:api 🐇 Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API
Projects
None yet
Development

No branches or pull requests

2 participants