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:
Shelley Vohr authored and GitHub committed 2022-07-25 05:37:17 +01:00
1 parent 2a7ac9298e
commit 92e63426c0
1 file changed
+1 -1
+1 -1
View File
@@ -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() {