Conversation
lib/console.js
Outdated
There was a problem hiding this comment.
Other than the function name printed in the process warning, couldn't Console.prototype.timeEnd() be updated to call this?
apapirovski
left a comment
There was a problem hiding this comment.
Barring spec changes, this looks great.
doc/api/console.md
Outdated
There was a problem hiding this comment.
Extra parenthesis in [`console.time()`)][].
doc/api/console.md
Outdated
There was a problem hiding this comment.
Maybe add a comment that value is 42 here? Otherwise, it is a bit unexpected below.
doc/api/console.md
Outdated
There was a problem hiding this comment.
Seems a bit confusing. Maybe something like // Prints "process: 365.227ms 42".?
|
Should we document the separator that joins several |
doc/api/console.md
Outdated
There was a problem hiding this comment.
It seems this should go after ### console.timeEnd(label) section ABC-wise.
There was a problem hiding this comment.
No strong opinion but this document doesn't seem to follow the ABC rule and I went for the spec order. It's also the order in which you call the methods
There was a problem hiding this comment.
All console. methods seem to be in ABC order according to the TOC.
There was a problem hiding this comment.
Right. I didn't see that inspector methods were in another section
|
@cjihrig I refactored the common code in a separate function. PTAL.
I don't know. It's just using |
|
@targos Then we can land as is and if anybody is sure how to document this (if needed), this can be done in another PR) |
doc/api/console.md
Outdated
There was a problem hiding this comment.
This will print a warning about no process label, right?
There was a problem hiding this comment.
It's not supposed to. timeLog shouldn't clear the timer.
lib/console.js
Outdated
There was a problem hiding this comment.
Nit: I personally would prefer to just check if data is undefined by adding a if / else but as the function is not hot, that is just a non-blocking recommendation.
|
Looks like this failed across the board. |
|
Upstream PR landed: https://console.spec.whatwg.org/#timelog |
|
CI before landing: https://ci.nodejs.org/job/node-test-pull-request/15728/ |
|
Landed in b016745 |
Refs: whatwg/console#138 PR-URL: #21312 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
Refs: whatwg/console#138 PR-URL: #21312 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
Notable changes: * console: * The `console.timeLog()` method has been implemented. (#21312) * deps: * Upgrade to libuv 1.22.0. (#21731) * Upgrade to ICU 62.1 (Unicode 11, CLDR 33.1). (#21728) * http: * Added support for passing both `timeout` and `agent` options to `http.request`. (#21204) * napi: * Added experimental support for functions dealing with bigint numbers. (#21226) * process: * The `process.hrtime.bigint()` method has been implemented. (#21256) * Added the `--title` command line argument to set the process title on startup. (#21477) * trace_events: * Added process_name metadata. (#21477)
Notable changes: * console: * The `console.timeLog()` method has been implemented. (#21312) * deps: * Upgrade to libuv 1.22.0. (#21731) * Upgrade to ICU 62.1 (Unicode 11, CLDR 33.1). (#21728) * http: * Added support for passing both `timeout` and `agent` options to `http.request`. (#21204) * napi: * Added experimental support for functions dealing with bigint numbers. (#21226) * process: * The `process.hrtime.bigint()` method has been implemented. (#21256) * Added the `--title` command line argument to set the process title on startup. (#21477) * trace_events: * Added process_name metadata. (#21477) * Added new collaborators * codebytere - Shelley Vohr PR-URL: #21851
Notable changes:
* console:
* The `console.timeLog()` method has been implemented.
(#21312)
* deps:
* Upgrade to libuv 1.22.0. (#21731)
* Upgrade to ICU 62.1 (Unicode 11, CLDR 33.1).
(#21728)
* http:
* Added support for passing both `timeout` and `agent` options to
`http.request`. (#21204)
* inspector:
* Expose the original console API in `require('inspector').console`.
(#21659)
* napi:
* Added experimental support for functions dealing with bigint numbers.
(#21226)
* process:
* The `process.hrtime.bigint()` method has been implemented.
(#21256)
* Added the `--title` command line argument to set the process title on
startup. (#21477)
* trace_events:
* Added process_name metadata.
(#21477)
* Added new collaborators
* codebytere - Shelley Vohr
PR-URL: #21851
Notable changes:
* console:
* The `console.timeLog()` method has been implemented.
(#21312)
* deps:
* Upgrade to libuv 1.22.0. (#21731)
* Upgrade to ICU 62.1 (Unicode 11, CLDR 33.1).
(#21728)
* http:
* Added support for passing both `timeout` and `agent` options to
`http.request`. (#21204)
* inspector:
* Expose the original console API in `require('inspector').console`.
(#21659)
* napi:
* Added experimental support for functions dealing with bigint numbers.
(#21226)
* process:
* The `process.hrtime.bigint()` method has been implemented.
(#21256)
* Added the `--title` command line argument to set the process title on
startup. (#21477)
* trace_events:
* Added process_name metadata.
(#21477)
* Added new collaborators
* codebytere - Shelley Vohr
PR-URL: #21851
Refs: whatwg/console#138
Marking blocked until the spec PR lands.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes