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 <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
  • Loading branch information
codebytere authored and targos committed Aug 1, 2022
1 parent ca747cc commit 5879642
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 5879642

Please sign in to comment.