steveniemitz commented on code in PR #22190:
URL: https://github.com/apache/beam/pull/22190#discussion_r921444460


##########
sdks/java/harness/jmh/src/main/java/org/apache/beam/fn/harness/jmh/control/ExecutionStateSamplerBenchmark.java:
##########
@@ -41,6 +41,16 @@
 public class ExecutionStateSamplerBenchmark {
   private static final String PTRANSFORM = "benchmarkPTransform";
 
+  @State(Scope.Thread)
+  public static class RunnersCoreStateTracker {
+    public ExecutionStateTracker tracker;
+
+    @Setup
+    public void setup(RunnersCoreStateSampler sharedState) {
+      tracker = new ExecutionStateTracker(sharedState.sampler);
+    }
+  }
+
   @State(Scope.Benchmark)
   public static class RunnersCoreStateSampler {
     public final ExecutionStateSampler sampler = 
ExecutionStateSampler.newForTest();

Review Comment:
   oh hm, yeah, this was always an issue with these tests right?  I think I 
just accidentally fixed it for the harness one because of how the API works.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to