bvolpato commented on code in PR #27078:
URL: https://github.com/apache/beam/pull/27078#discussion_r1227470347
##########
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:
Just curious, how do we validate that the proper MDC is in place? Seems like
we have benchmarks but it isn't clear if we test the functionality.
--
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]