Skip to content

Commit 9e36df0

Browse files
authored
Fix control case for the profiler benchmark (#5108)
1 parent 149742b commit 9e36df0

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

benchmark/sirun/profiler/index.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,16 @@ if (PROFILER === 'space' || PROFILER === 'all') {
1717
profilers.push(new SpaceProfiler())
1818
}
1919

20+
if (profilers.length === 0) {
21+
// Add a no-op "profiler"
22+
profilers.push({
23+
start: () => {},
24+
stop: () => {},
25+
profile: () => { return true },
26+
encode: () => { Promise.resolve(true) }
27+
})
28+
}
29+
2030
const exporters = [{
2131
export () {
2232
profiler.stop()

0 commit comments

Comments
 (0)