hyj1991 / v8-profiler-next

node bindings for the v8 profiler
MIT License
218 stars 21 forks source link

Timings including idle time? #69

Closed ffMathy closed 8 months ago

ffMathy commented 9 months ago

Any idea of how to make the profiler record exact execution time including delays? Some profilers in other languages can do this.

My problem is not CPU or memory bound, but I'd still like to know where it is located. Looking at timings including waiting-time per function (or line) can help, but I am not sure how to achieve it with this profiler.

hyj1991 commented 8 months ago

Hey there! I'm so sorry for the delayed response – I was away on vacation.

Unfortunately, the CPU Profiler might not be able to meet your requirements. The way it works is by initiating a sampling thread that intermittently collects the function call stack currently being executed by V8. It then pieces this information together to represent the function call activity during the sampling period.