GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — console: implement timeLog method by targos · Pull Request #21312 · nodejs/node

Conversation

@targos

@targos targos commented Jun 13, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Refs: whatwg/console#138

Marking blocked until the spec PR lands.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

givanse reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@targos targos added wip Issues and PRs that are still a work in progress. semver-minor PRs that contain new features and should be released in the next minor version. console Issues and PRs related to the console subsystem. labels Jun 13, 2018
@nodejs-github-bot

nodejs-github-bot commented Jun 13, 2018

Copy link
Copy Markdown
Collaborator

@targos build started: https://ci.nodejs.org/blue/organizations/jenkins/node-test-pull-request-lite-pipeline/detail/node-test-pull-request-lite-pipeline/50/pipeline

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot added the console Issues and PRs related to the console subsystem. label Jun 13, 2018
@targos targos added blocked PRs that are blocked by other issues or PRs. and removed wip Issues and PRs that are still a work in progress. labels Jun 13, 2018
cjihrig
cjihrig approved these changes Jun 13, 2018
View reviewed changes
Comment thread lib/console.js Outdated

@cjihrig cjihrig Jun 13, 2018

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the function name printed in the process warning, couldn't Console.prototype.timeEnd() be updated to call this?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
devsnek
devsnek approved these changes Jun 13, 2018
View reviewed changes
apapirovski
apapirovski approved these changes Jun 13, 2018
View reviewed changes

@apapirovski apapirovski left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Barring spec changes, this looks great.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
vsemozhetbyt
vsemozhetbyt reviewed Jun 13, 2018
View reviewed changes
Comment thread doc/api/console.md Outdated

@vsemozhetbyt vsemozhetbyt Jun 13, 2018

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra parenthesis in [`console.time()`)][].

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

targos reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
Comment thread doc/api/console.md Outdated

@vsemozhetbyt vsemozhetbyt Jun 13, 2018

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a comment that value is 42 here? Otherwise, it is a bit unexpected below.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

targos reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
Comment thread doc/api/console.md Outdated

@vsemozhetbyt vsemozhetbyt Jun 13, 2018

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems a bit confusing. Maybe something like // Prints "process: 365.227ms 42".?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

targos reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@vsemozhetbyt

vsemozhetbyt commented Jun 13, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Should we document the separator that joins several `...data` values?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

vsemozhetbyt
vsemozhetbyt reviewed Jun 13, 2018
View reviewed changes
Comment thread doc/api/console.md Outdated

@vsemozhetbyt vsemozhetbyt Jun 13, 2018

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems this should go after ### console.timeEnd(label) section ABC-wise.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@targos targos Jun 13, 2018

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@vsemozhetbyt vsemozhetbyt Jun 13, 2018

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All console. methods seem to be in ABC order according to the TOC.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

targos reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@targos targos Jun 14, 2018

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right. I didn't see that inspector methods were in another section

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

vsemozhetbyt reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
starkwang
starkwang approved these changes Jun 14, 2018
View reviewed changes
@targos
targos force-pushed the console-timelog branch from e6f1714 to 73c32ca Compare June 16, 2018 16:52
@targos

targos commented Jun 16, 2018

Copy link
Copy Markdown
Member Author

@cjihrig I refactored the common code in a separate function. PTAL.

@vsemozhetbyt

Should we document the separator that joins several ...data values?

I don't know. It's just using console.log()'s mechanics. Perhaps we should document that? I don't know how to write it though.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vsemozhetbyt

vsemozhetbyt commented Jun 16, 2018

Copy link
Copy Markdown
Contributor

@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)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

BridgeAR
BridgeAR approved these changes Jun 18, 2018
View reviewed changes
Comment thread doc/api/console.md Outdated

@BridgeAR BridgeAR Jun 18, 2018

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will print a warning about no process label, right?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@targos targos Jun 18, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not supposed to. timeLog shouldn't clear the timer.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread lib/console.js Outdated

@BridgeAR BridgeAR Jun 18, 2018

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@targos targos Jun 18, 2018

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can do that 👍

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
jasnell
jasnell approved these changes Jun 21, 2018
View reviewed changes
@apapirovski

apapirovski commented Jun 25, 2018

Copy link
Copy Markdown
Contributor

CI: https://ci.nodejs.org/job/node-test-pull-request/15599/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jasnell

jasnell commented Jun 29, 2018

Copy link
Copy Markdown
Member

Looks like this failed across the board.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@targos
targos force-pushed the console-timelog branch from 63bd821 to 67279d0 Compare June 30, 2018 12:41
@targos
console: implement timeLog method
32bae6b
Refs: whatwg/console#138
@targos
targos force-pushed the console-timelog branch from 67279d0 to 32bae6b Compare June 30, 2018 12:50
@targos

targos commented Jun 30, 2018

Copy link
Copy Markdown
Member Author

CI: https://ci.nodejs.org/job/node-test-pull-request/15686/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@domfarolino domfarolino mentioned this pull request Jul 4, 2018
console: console.countReset() should emit warning #21649
Closed
4 tasks done
@targos targos removed the blocked PRs that are blocked by other issues or PRs. label Jul 4, 2018
@targos

targos commented Jul 4, 2018

Copy link
Copy Markdown
Member Author

Upstream PR landed: https://console.spec.whatwg.org/#timelog

devsnek, paambaati, and pikitgb reacted with hooray emoji
All reactions
  • 🎉 3 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@targos

targos commented Jul 4, 2018

Copy link
Copy Markdown
Member Author

CI before landing: https://ci.nodejs.org/job/node-test-pull-request/15728/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@targos

targos commented Jul 4, 2018

Copy link
Copy Markdown
Member Author

Landed in b016745

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@targos targos closed this Jul 4, 2018
@targos
targos deleted the console-timelog branch July 4, 2018 20:14
targos added a commit that referenced this pull request Jul 4, 2018
@targos
console: implement timeLog method
b016745
Refs: whatwg/console#138

PR-URL: #21312
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: Weijia Wang <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: James M Snell <[email protected]>
targos added a commit that referenced this pull request Jul 6, 2018
@targos
console: implement timeLog method
f3c397c
Refs: whatwg/console#138

PR-URL: #21312
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: Weijia Wang <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: James M Snell <[email protected]>
targos added a commit that referenced this pull request Jul 17, 2018
@targos
2018-07-18, Version 10.7.0 (Current)
68fc100
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)
@targos targos mentioned this pull request Jul 17, 2018
v10.7.0 proposal #21851
Merged
targos added a commit that referenced this pull request Jul 18, 2018
@targos
2018-07-18, Version 10.7.0 (Current)
5543b9c
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
targos added a commit that referenced this pull request Jul 18, 2018
@targos
2018-07-18, Version 10.7.0 (Current)
991bb95
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
targos added a commit that referenced this pull request Jul 18, 2018
@targos
2018-07-18, Version 10.7.0 (Current)
bb87e41
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
This was referenced Jul 18, 2018
2018-07-18 Version 10.7.0 (Current) @targos beevelop/docker-nodejs#207
Closed
2018-07-18 Version 10.7.0 (Current) @targos beevelop/docker-nodejs#208
Closed
2018-07-18 Version 10.7.0 (Current) @targos beevelop/docker-nodejs#209
Closed
2018-07-18 Version 10.7.0 (Current) @targos beevelop/docker-nodejs#210
Closed
2018-07-18 Version 10.7.0 (Current) @targos beevelop/docker-nodejs#211
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jasnell jasnell jasnell approved these changes
@cjihrig cjihrig cjihrig approved these changes
@BridgeAR BridgeAR BridgeAR approved these changes
+4 more reviewers
@vsemozhetbyt vsemozhetbyt vsemozhetbyt left review comments
@apapirovski apapirovski apapirovski approved these changes
@devsnek devsnek devsnek approved these changes
@starkwang starkwang starkwang approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

console Issues and PRs related to the console subsystem. semver-minor PRs that contain new features and should be released in the next minor version.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

9 participants

@targos @nodejs-github-bot @vsemozhetbyt @apapirovski @jasnell @cjihrig @devsnek @BridgeAR @starkwang
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.