Open ankon opened 6 years ago
I think that PR would be a no-op for node-remote-pprof since you are using gperftools profiler which 1) doesn't query V8 state; 2) samples only when there is CPU time spent anyway. The cloud-profiler-nodejs agent uses V8's CPU profiler which is more like wall time profiler for the main V8's thread and so it needs to record a special name when the thread is in an idle state.
By the way, did you consider integrating your profiler with the V8 CPU and sampling heap profilers instead? I think that would be good for analysis of the JS code performance - it would lack the native code but it wouldn't require adding any flags to the node invocation and so would be suitable to be always on in production.
Basically: Merge https://github.com/GoogleCloudPlatform/cloud-profiler-nodejs/issues/38.