mirror of
https://github.com/nodejs/node.git
synced 2026-10-10 18:59:49 -04:00
inspector: set sampling interval before start
PR-URL: https://github.com/nodejs/node/pull/43779 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
This commit is contained in:
1 parent
2a7ac9298e
commit
92e63426c0
1 file changed
+1
-1
@@ -331,11 +331,11 @@ MaybeLocal<Object> V8CpuProfilerConnection::GetProfile(Local<Object> result) {
|
||||
|
||||
void V8CpuProfilerConnection::Start() {
|
||||
DispatchMessage("Profiler.enable");
|
||||
DispatchMessage("Profiler.start");
|
||||
std::string params = R"({ "interval": )";
|
||||
params += std::to_string(env()->cpu_prof_interval());
|
||||
params += " }";
|
||||
DispatchMessage("Profiler.setSamplingInterval", params.c_str());
|
||||
DispatchMessage("Profiler.start");
|
||||
}
|
||||
|
||||
void V8CpuProfilerConnection::End() {
|
||||
|
||||
Reference in new issue
Block a user