Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Minor thread filter adjustement
remove the logs
  • Loading branch information
r1viollet committed Jun 25, 2025
commit 60ef0601ab11807674bb5be7287671b74c67e27e
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public class ThreadFilterBenchmark extends Configuration {
@Setup(Level.Trial)
public void setup() throws IOException {
System.out.println("Setting up benchmark...");
System.out.println("Thread filters enabled: " + useThreadFilters);
System.out.println("Creating thread pool with " + NUM_THREADS + " threads");
executorService = Executors.newFixedThreadPool(NUM_THREADS);
System.out.println("Getting profiler instance");
Expand Down Expand Up @@ -110,6 +111,7 @@ public void tearDown() {
// Stop the profiler if it's active
try {
profiler.stop();
System.out.println("Profiler stopped.");
} catch (IllegalStateException e) {
System.out.println("Profiler was not active at teardown.");
}
Expand Down Expand Up @@ -144,6 +146,10 @@ public void tearDown() {
}
}

public void setUseThreadFilters(boolean useThreadFilters) {
this.useThreadFilters = useThreadFilters;
}

@Benchmark
@BenchmarkMode(Mode.Throughput)
@Fork(value = 1, warmups = 1)
Expand All @@ -156,7 +162,7 @@ public long threadFilterStress() throws InterruptedException {
startLatch = new CountDownLatch(NUM_THREADS);
stopLatch = new CountDownLatch(NUM_THREADS);

// Start all worker threads
// Start all worker threads[]
for (int i = 0; i < NUM_THREADS; i++) {
final int threadId = i;
executorService.submit(() -> {
Expand Down Expand Up @@ -242,4 +248,4 @@ public long threadFilterStress() throws InterruptedException {
stopLatch.await();
return operationCount.get();
}
}
}
Loading