jacek-lewandowski commented on code in PR #2534:
URL: https://github.com/apache/cassandra/pull/2534#discussion_r1314785407
##########
src/java/org/apache/cassandra/service/accord/AccordStateCache.java:
##########
@@ -66,22 +60,27 @@ static class Stats
private int unreferenced = 0;
private long maxSizeInBytes;
private long bytesCached = 0;
- private final Stats stats = new Stats();
+ private final String metricsScope;
+
+ @VisibleForTesting
+ final AccordStateCacheMetrics metrics;
- public AccordStateCache(ExecutorPlus loadExecutor, ExecutorPlus
saveExecutor, long maxSizeInBytes)
+ public AccordStateCache(ExecutorPlus loadExecutor, ExecutorPlus
saveExecutor, long maxSizeInBytes, String metricsScope)
{
this.loadExecutor = loadExecutor;
this.saveExecutor = saveExecutor;
this.maxSizeInBytes = maxSizeInBytes;
+ this.metricsScope = metricsScope;
+ this.metrics = new AccordStateCacheMetrics(String.format("%s-global",
metricsScope), this);
Review Comment:
Agreed
--
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]