From 58796422604c7d2f14efd433b4db569f0434a6d5 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Mon, 25 Jul 2022 06:37:17 +0200 Subject: [PATCH] inspector: set sampling interval before start MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/43779 Reviewed-By: Joyee Cheung Reviewed-By: Colin Ihrig Reviewed-By: Michaƫl Zasso Reviewed-By: Darshan Sen --- 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() {