udim commented on code in PR #27078:
URL: https://github.com/apache/beam/pull/27078#discussion_r1228543208


##########
sdks/java/harness/jmh/src/main/java/org/apache/beam/fn/harness/jmh/logging/BeamFnLoggingClientBenchmark.java:
##########
@@ -206,6 +207,23 @@ public void testLoggingWithCustomData(
     }
   }
 
+  @Benchmark
+  @Threads(16) // Use several threads since we expect contention during logging
+  public void testLoggingWithQuotaEvent(
+      ManyExpectedCallsLoggingClientAndService client, ManageExecutionState 
executionState)
+      throws Exception {
+    try (Closeable state =
+        
executionState.executionStateTracker.enterState(executionState.simpleExecutionState))
 {
+      try (AutoCloseable ac =
+          new QuotaEvent.Builder()
+              .withOperation("test")
+              .withFullResourceName("//test.googleapis.com/abc/123")
+              .create()) {
+        LOG.warn("log me");

Review Comment:
   To be clearer: the SDK's logging handler adds the MDC data to the LogEntry, 
which is passed to the FnAPI logging handler. The standard JUL 
(java.util.logging) handler does not use MDC so it's harder to test.



-- 
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