From 7f81db786aa9684b1b37721380702b07102f78c8 Mon Sep 17 00:00:00 2001 From: Zhengyu Gu Date: Tue, 5 Aug 2025 10:36:20 -0400 Subject: [PATCH] Avoid calling profiler.stop() twice in ThreadFilterBenchmark --- .../scenarios/counters/ThreadFilterBenchmark.java | 7 ------- 1 file changed, 7 deletions(-) diff --git a/ddprof-stresstest/src/jmh/java/com/datadoghq/profiler/stresstest/scenarios/counters/ThreadFilterBenchmark.java b/ddprof-stresstest/src/jmh/java/com/datadoghq/profiler/stresstest/scenarios/counters/ThreadFilterBenchmark.java index 246cbd1dd..eab18e7ab 100644 --- a/ddprof-stresstest/src/jmh/java/com/datadoghq/profiler/stresstest/scenarios/counters/ThreadFilterBenchmark.java +++ b/ddprof-stresstest/src/jmh/java/com/datadoghq/profiler/stresstest/scenarios/counters/ThreadFilterBenchmark.java @@ -103,13 +103,6 @@ public void tearDown() { Thread.currentThread().interrupt(); } - // Stop the profiler if it's active - try { - profiler.stop(); - } catch (IllegalStateException e) { - System.out.println("Profiler was not active at teardown."); - } - long endTime = System.currentTimeMillis(); long totalOps = operationCount.get(); double durationSecs = (endTime - startTime) / 1000.0;