nodejs / nodejs/node

console.timeStamp(...) and performance.mark/measure are missing from the --inspect Performance Timings timeline

Open
#47,813 8 comments 13 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

inspector perf_hooks
Dominant language
JavaScript
Stars
122k
Forks
37.3k
Avg merge
4d 2h
Merged PRs (30d)
283

Description

Version

20

Platform

No response

Subsystem

No response

What steps will reproduce the bug?
console.profile()

console.timeStamp('Start Rendering')
performance.mark("Start rendering")

function createArr() {
  return new Array(10000).join('x')
}

for (var i=0; i< 1000;i++) {
  createArr()
}

performance.mark("Finish rendering")
performance.measure("Rendering", "Start rendering", "Finish rendering")

console.timeStamp('Finish Rendering')
console.profileEnd()
How often does it reproduce? Is there a required condition?

No response

What is the expected behavior? Why is that the expected behavior?
  1. Per the node docs on console.timeStamp(...) with the --inspect flag enabled, I should be able to see the timestamp indicated on the performance tab.

  2. The User Timings API, performance.mark, and performance.measure show up as "Timings" in the browser's Chrome Dev Tools, but does not show up in node.

What do you see instead?

I don't see any User Timings API calls on the performance timeline.

image

When using the same performance.* methods in the browser I see them show up in the Performance Timeline.

image
Additional information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the example with Node 20 and --inspect, then compare the Performance Timings timeline with the browser behavior described in the issue. Trace how console.timeStamp, performance.mark, and performance.measure are exposed to the inspector and verify that timestamps, marks, and measures appear in Chrome DevTools.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
devtools, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.