Skip to content

Commit 92e6342

Browse files
authored
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>
1 parent 2a7ac92 commit 92e6342

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/inspector_profiler.cc

Lines changed: 1 addition & 1 deletion
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)