Skip to content

Commit 781d5e5

Browse files
codebyteredanielleadams
authored andcommitted
inspector: set sampling interval before start
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]>
1 parent f0ed1ae commit 781d5e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/inspector_profiler.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -331,11 +331,11 @@ MaybeLocal<Object> V8CpuProfilerConnection::GetProfile(Local<Object> result) {
331331

332332
void V8CpuProfilerConnection::Start() {
333333
DispatchMessage("Profiler.enable");
334-
DispatchMessage("Profiler.start");
335334
std::string params = R"({ "interval": )";
336335
params += std::to_string(env()->cpu_prof_interval());
337336
params += " }";
338337
DispatchMessage("Profiler.setSamplingInterval", params.c_str());
338+
DispatchMessage("Profiler.start");
339339
}
340340

341341
void V8CpuProfilerConnection::End() {

0 commit comments

Comments
 (0)