nodejs / nodejs/node

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

Đang mở
#47,813 8 bình luận 13 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

inspector perf_hooks
Ngôn ngữ chính
JavaScript
Star
122k
Fork
37.3k
Merge trung bình
4 ngày 2 giờ
Pull request đã merge (30 ngày)
283

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện ví dụ với Node 20 và --inspect, sau đó so sánh dòng thời gian Performance Timings với hành vi của trình duyệt được mô tả trong issue. Theo dõi cách console.timeStamp, performance.mark và performance.measure được cung cấp cho inspector, đồng thời xác minh rằng các dấu thời gian, mark và measure xuất hiện trong Chrome DevTools.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
javascript
Lĩnh vực
devtools, performance
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
50/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.