From ae42c8e83975779cc3cd39f2862d7fcf3e2929c1 Mon Sep 17 00:00:00 2001 From: JonasBa Date: Mon, 10 Feb 2025 14:58:46 -0500 Subject: [PATCH 1/2] profiling: bump chunk interval to 60s --- packages/profiling-node/src/integration.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/profiling-node/src/integration.ts b/packages/profiling-node/src/integration.ts index 5b455f72974d..4fffdf490901 100644 --- a/packages/profiling-node/src/integration.ts +++ b/packages/profiling-node/src/integration.ts @@ -30,7 +30,7 @@ import { makeProfileChunkEnvelope, } from './utils'; -const CHUNK_INTERVAL_MS = 5000; +const CHUNK_INTERVAL_MS = 1000 * 60; const PROFILE_MAP = new LRUMap(50); const PROFILE_TIMEOUTS: Record = {}; From 84c814c38e4d7430688b9f03b0a995d628e04f38 Mon Sep 17 00:00:00 2001 From: JonasBa Date: Mon, 10 Feb 2025 15:07:11 -0500 Subject: [PATCH 2/2] fixup! profiling: bump chunk interval to 60s --- packages/profiling-node/test/spanProfileUtils.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/profiling-node/test/spanProfileUtils.test.ts b/packages/profiling-node/test/spanProfileUtils.test.ts index 758307d3fa34..c0640064c537 100644 --- a/packages/profiling-node/test/spanProfileUtils.test.ts +++ b/packages/profiling-node/test/spanProfileUtils.test.ts @@ -501,7 +501,7 @@ describe('continuous profiling', () => { expect(startProfilingSpy).not.toHaveBeenCalledTimes(1); Sentry.profiler.startProfiler(); - jest.advanceTimersByTime(5001); + jest.advanceTimersByTime(60_001); expect(stopProfilingSpy).toHaveBeenCalledTimes(1); expect(startProfilingSpy).toHaveBeenCalledTimes(2); }); @@ -518,7 +518,7 @@ describe('continuous profiling', () => { Sentry.profiler.startProfiler(); const profilerId = getProfilerId(); - jest.advanceTimersByTime(5001); + jest.advanceTimersByTime(60_001); expect(stopProfilingSpy).toHaveBeenCalledTimes(1); expect(startProfilingSpy).toHaveBeenCalledTimes(2); expect(getProfilerId()).toBe(profilerId); @@ -552,7 +552,7 @@ describe('continuous profiling', () => { expect(startProfilingSpy).not.toHaveBeenCalledTimes(1); Sentry.profiler.startProfiler(); - jest.advanceTimersByTime(5001); + jest.advanceTimersByTime(60_001); expect(stopProfilingSpy).toHaveBeenCalledTimes(1); });