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

doc: console.time() Does Not Document PR #29251 Changes #35011

Closed
1 task
Whobeu opened this issue Sep 1, 2020 · 1 comment
Closed
1 task

doc: console.time() Does Not Document PR #29251 Changes #35011

Whobeu opened this issue Sep 1, 2020 · 1 comment
Labels
doc Issues and PRs related to the documentations.

Comments

@Whobeu
Copy link

Whobeu commented Sep 1, 2020

📗 API Reference Docs Problem

  • Version: 14.9.0
  • Platform: Windows 10 2004 64-bit
  • Subsystem: Console

Location

Section of the site where the content exists

Affected URL(s):

Description

Concise explanation of the problem

The current documentation for console.time states "...when calling console.timeEnd() to stop the timer and output the elapsed time in milliseconds to stdout". However, since the application of PR #29251 that affects Node.js V13 and higher, this behavior changed to "display timeEnd with suitable time unit". For example, if the elapsed time is 3869ms, console.timeEnd() now displays "3.869s". For greater values, it will also display hours and minutes per the code in lib/internal/console/constructor.js. In the examples for console.timeLog() and consooe.timeEnd(), none show anything other than milliseconds as an output.


  • I would like to work on this issue and
    submit a pull request.
@Whobeu Whobeu added the doc Issues and PRs related to the documentations. label Sep 1, 2020
@yashLadha
Copy link
Contributor

Would like to take this up and sending a PR shortly.

yashLadha added a commit to yashLadha/node that referenced this issue Oct 3, 2020
Since PR nodejs#29251 is merged into the
master, the implementation of `console.timeEnd` is not to print the
milliseconds on the stdout but instead print a more readable time unit
on the console. For example if the total time comes out to be 3456
milliseconds, it will be printed as 3.45 seconds so that it is much more
readable and consistent.

Referenced PR: nodejs#29251
Fixes: nodejs#35011
@lpinca lpinca closed this as completed in 6139e58 Oct 3, 2020
danielleadams pushed a commit that referenced this issue Oct 6, 2020
Since PR #29251 is merged into
master, the implementation of `console.timeEnd` is not to print the
milliseconds on the stdout but instead print a more readable time unit
on the console. For example if the total time comes out to be 3456
milliseconds, it will be printed as 3.45 seconds so that it is much more
readable and consistent.

PR-URL: #35027
Fixes: #35011
Refs: #29251
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
joesepi pushed a commit to joesepi/node that referenced this issue Jan 8, 2021
Since PR nodejs#29251 is merged into
master, the implementation of `console.timeEnd` is not to print the
milliseconds on the stdout but instead print a more readable time unit
on the console. For example if the total time comes out to be 3456
milliseconds, it will be printed as 3.45 seconds so that it is much more
readable and consistent.

PR-URL: nodejs#35027
Fixes: nodejs#35011
Refs: nodejs#29251
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants