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

Timing and Counting methods should report warnings when necessary #134

Open
domfarolino opened this Issue May 4, 2018 · 0 comments

Comments

1 participant
@domfarolino
Member

domfarolino commented May 4, 2018

Right now console.time() mentions an optionally-reported warning on trying to start an already-existing timer. We should strengthen this by implementing some sort of formal error-reporting method (#57) and making the warning mandatory.

Furthermore, console.timeEnd() in all implementations (can't remember Edge's behavior though) prints a warning when trying to end a non-existent timer. To bring the spec closer to implementations, and also align timeEnd() with countReset (currently being specced), I propose make timeEnd() also report an warning under the previously-mentioned conditions.

Edit

In short:

  • time() should report a warning
  • timeEnd() should:
    • remove a timer from the timer table when dealing with existing timers
    • report a mandatory error when a timer doesn't exist
  • timeLog()should report a warning.
  • countReset() should report a warning (it does, but we should do it formally)
  • timeLog() consider moving timeLog() from the info to the log section in the severity table

@domfarolino domfarolino self-assigned this May 4, 2018

@domfarolino domfarolino changed the title from time() should call Logger(); timeEnd should report warning to Timing and Counting methods should report warnings when necessary May 25, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment