aweisberg commented on code in PR #2049:
URL: https://github.com/apache/cassandra/pull/2049#discussion_r1081794316
##########
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:
This looks more complicated than just latency since it's counting a bunch of
different things. Abort, timeout, unavailable, mutation size. I think we need
to think a little harder about metrics for Accord transactions.
##########
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:
This looks more complicated then just latency since it's counting a bunch of
different things. Abort, timeout, unavailable, mutation size. I think we need
to think a little harder about metrics for Accord transactions.
--
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]