From ed7dbce7993bec7098fdf6ebcb7138f4f1197b13 Mon Sep 17 00:00:00 2001 From: Ruslan Lesiutin Date: Tue, 4 Mar 2025 08:10:41 -0800 Subject: [PATCH] Increase Hermes Sampling rate to 10kHz (#49795) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/49795 # Changelog: [Internal] I've been able to reliably and consistently record samples with an interval between 2 consecutive ones to be ~0.1-0.2ms, lets bump the sampling frequency to have more frames. On Windows, Hermes Sampler peaks at ~500Hz, so this won't have much effect. Reviewed By: huntie Differential Revision: D70395983 fbshipit-source-id: 9a9e619d75096a3ee75e0e1a2f8b8fff33130268 --- .../inspector-modern/chrome/HermesRuntimeTargetDelegate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/ReactCommon/hermes/inspector-modern/chrome/HermesRuntimeTargetDelegate.cpp b/packages/react-native/ReactCommon/hermes/inspector-modern/chrome/HermesRuntimeTargetDelegate.cpp index 30c88793ae9..f1b66d931ef 100644 --- a/packages/react-native/ReactCommon/hermes/inspector-modern/chrome/HermesRuntimeTargetDelegate.cpp +++ b/packages/react-native/ReactCommon/hermes/inspector-modern/chrome/HermesRuntimeTargetDelegate.cpp @@ -31,7 +31,7 @@ namespace facebook::react::jsinspector_modern { #ifdef HERMES_ENABLE_DEBUGGER namespace { -const uint16_t HERMES_SAMPLING_FREQUENCY_HZ = 1000; +const uint16_t HERMES_SAMPLING_FREQUENCY_HZ = 10000; } // namespace