-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How should profiling interact with worker-threads? #79
Comments
Thanks -- I hadn't yet experimented with worker_threads. Long term, I assume the goal for pprof-nodejs will be to have profiles which are collected outside of worker threads include information about worker threads, so I'm not extremely concerned that profiles cannot be collected within worker threads (except that it does make me think there will be some complications for collecting profiles which include information about worker threads). Experimenting a bit here, though, the profiles collected right now when there's a worker thread are rather strange. Heap Allocations, for example, seem to be attributed to call stacks somewhat randomly. The first time I profiled, heap allocations from within the worker were attributed to "keys"; the next time, they were attributed to "Lines": The wall profile was more within expected behavior. It was 100% idle, since it only profiled the main thread. The script I used is attached: |
At this point in time, I don't think this is a feature request that can be prioritized for pprof-nodejs. Marking as closed (I think a fix here would likely require upstream changes) |
Same issue |
Trying to start the profiler inside worker-thread results in either
TypeError: process._startProfilerIdleNotifier is not a function
orModule did not self-register
error.I've used this simple example:
To try to profile inside a worker.
Full code and sample errors are in my repository: https://github.com/slonka/pprof-nodejs-and-worker-threads
Tested on OSX node 12.6.0 and 11.15.0
The text was updated successfully, but these errors were encountered: