Skip to content
Permalink
Browse files
inspector: set sampling interval before start
PR-URL: #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>
  • Loading branch information
codebytere authored and danielleadams committed Jul 26, 2022
1 parent f0ed1ae commit 781d5e54e39e0b2edb85bd68ffea13b8c34d9007
Showing 1 changed file with 1 addition and 1 deletion.
@@ -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() {

0 comments on commit 781d5e5

Please sign in to comment.