From 9e36df06dde5ddca8de9e2ed272df0bdb7c2595a Mon Sep 17 00:00:00 2001 From: Attila Szegedi Date: Tue, 14 Jan 2025 17:26:58 +0100 Subject: [PATCH] Fix control case for the profiler benchmark (#5108) --- benchmark/sirun/profiler/index.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/benchmark/sirun/profiler/index.js b/benchmark/sirun/profiler/index.js index 0101cfb1c00..233dbc18770 100644 --- a/benchmark/sirun/profiler/index.js +++ b/benchmark/sirun/profiler/index.js @@ -17,6 +17,16 @@ if (PROFILER === 'space' || PROFILER === 'all') { profilers.push(new SpaceProfiler()) } +if (profilers.length === 0) { + // Add a no-op "profiler" + profilers.push({ + start: () => {}, + stop: () => {}, + profile: () => { return true }, + encode: () => { Promise.resolve(true) } + }) +} + const exporters = [{ export () { profiler.stop()