From e27b9bc043e98daeab1cf69027d4b7910cd87cdd Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Mon, 11 Jul 2022 16:57:37 +0200 Subject: [PATCH] inspector: set sampling interval before start --- src/inspector_profiler.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/inspector_profiler.cc b/src/inspector_profiler.cc index db8bda8524d3b4..332aa536364fba 100644 --- a/src/inspector_profiler.cc +++ b/src/inspector_profiler.cc @@ -331,11 +331,11 @@ MaybeLocal V8CpuProfilerConnection::GetProfile(Local 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() {