Skip to content

Commit

Permalink
inspector: set sampling interval before start
Browse files Browse the repository at this point in the history
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 targos committed Jul 31, 2022
1 parent 5e9bdb6 commit e6048b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/inspector_profiler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit e6048b0

Please sign in to comment.