aweisberg commented on code in PR #2049:
URL: https://github.com/apache/cassandra/pull/2049#discussion_r1063846696


##########
test/distributed/org/apache/cassandra/distributed/test/accord/AccordTestBase.java:
##########
@@ -183,6 +196,27 @@ public static void install(ClassLoader classLoader, 
Integer num)
             return map;
         }
     }
-    
+
+    public static class BBAccordCoordinateCountHelper
+    {
+        static AtomicInteger count = new AtomicInteger();
+        static void install(ClassLoader cl, int nodeNumber)
+        {
+            if (nodeNumber != 1)
+                return;
+            new ByteBuddy().rebase(AccordService.class)
+                           .method(named("coordinate").and(takesArguments(2)))
+                           
.intercept(MethodDelegation.to(BBAccordCoordinateCountHelper.class))
+                           .make()
+                           .load(cl, ClassLoadingStrategy.Default.INJECTION);
+        }
+
+        public static TxnData coordinate(Txn txn, @SuperCall Callable<TxnData> 
actual) throws Exception
+        {
+            count.incrementAndGet();
+            return actual.call();
+        }
+    }

Review Comment:
   Seems reasonable. Do we want separate metrics for transactions that are 
write only since they generally have a very different latency profile?



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to