pprof って go のやつでしょ? node のプロファイルが取れるわけ無いやろ,と僕も思っていたんですが以下のライブラリを使うことで取れることがわかりました. github.com 使い方については Using the Profiler に書いてあるとおりで,アプリケーション側に const profile = await pprof.time.profile({ durationMillis: 10000, // time in milliseconds for which to // collect profile. }); const buf = await pprof.encode(profile); fs.writeFile('wall.pb.gz', buf, (err) => { if (err) throw err; }); という風に書いてあげるとwall time
![pprof を使って nodejs アプリケーションのプロファイルを取る - その手の平は尻もつかめるさ](https://cdn-ak-scissors.b.st-hatena.com/image/square/67549e3991f04ecd32a7b937bd51300e4fadc201/height=288;version=1;width=512/https%3A%2F%2Fcdn-ak.f.st-hatena.com%2Fimages%2Ffotolife%2Fm%2Fmoznion%2F20201005%2F20201005120750.png)