console.timeEnd more flexible #4214

wants to merge 4 commits into


None yet
5 participants

I made a small patch to allow us to use format on timeEnd.

console.time('Found %d places');
console.timeEnd('Found %d places', 2);

> Found 2 places: 0ms

console.time('Found %d places and %d faces');
console.timeEnd('Found %d places and %d faces', 2, 5);

> Found 2 places and 5 faces: 0ms

It is useful to profile and log at the same time. What do you think?

Needs tests and an addition to the docs at the very least.


bnoordhuis commented Oct 30, 2012

@fredericosilva As a friendly FYI, GH doesn't send notification emails when you push a new commit, you have to post a "done" message in the PR afterwards.

That said, this comment should wake up @TooTallNate. :-)

Good to know. thank you @bnoordhuis


@TooTallNate is it ok like this?

Can one of the admins verify this patch?


jasnell commented Jun 1, 2015

@fredericosilva ... I know it's been a while, but is this still something you want to pursue? If yes, the PR would need to be updated. If not, we should likely go ahead and close.


jasnell commented Jun 24, 2015

Closing this for now. Unless the PR is updated, it's not ever likely to land here. @fredericosilva , if you wish to pursue this further, please open a PR against either nodejs/io.js or nodejs/node.

jasnell closed this Jun 24, 2015

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