ekaterinadimitrova2 commented on code in PR #2648:
URL: https://github.com/apache/cassandra/pull/2648#discussion_r1337919951
##########
src/java/org/apache/cassandra/metrics/ChunkCacheMetrics.java:
##########
@@ -72,14 +73,14 @@ public void recordLoadFailure(long loadTime)
}
@Override
- public void recordEviction()
+ public void recordEviction(int weight, RemovalCause cause)
{
}
@Nonnull
@Override
public CacheStats snapshot()
{
- return new CacheStats(hits.getCount(), misses.getCount(),
missLatency.getCount(), 0L, missLatency.getCount(), 0L, 0L);
+ return CacheStats.of(hits.getCount(), misses.getCount(),
missLatency.getCount(), 0L, missLatency.getCount(), 0L, 0L);
Review Comment:
I think you are right. According to the javadoc:
```
[loadSuccessCount](https://www.javadoc.io/static/com.github.ben-manes.caffeine/caffeine/2.9.2/com/github/benmanes/caffeine/cache/stats/CacheStats.html#loadSuccessCount--)()
Returns the *number of times*
[Cache](https://www.javadoc.io/static/com.github.ben-manes.caffeine/caffeine/2.9.2/com/github/benmanes/caffeine/cache/Cache.html)
lookup methods have successfully loaded a new value.
```
So it should be a number of times, but we provide latency/time... I am not
sure why that was done this way.
It seems this was added in 4.0+ in
[CASSANDRA-14628](https://issues.apache.org/jira/browse/CASSANDRA-14628)
@iamaleksey, any comments?
--
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]