[
https://issues.apache.org/jira/browse/CASSANDRA-14628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16587281#comment-16587281
]
Aleksey Yeschenko edited comment on CASSANDRA-14628 at 8/21/18 10:57 AM:
-------------------------------------------------------------------------
bq. Modernise all of the RatioGauge construction as well, via a static method
that accepts a Supplier<Ratio>
Looks good. Can look better though. Might as well go all the way and make a
static method that accepts two {{DoubleSupplier}} s
bq. Replace requests with a Metered that proxies its calls to getX onto
hits.getX() + misses.getX()
Good call.
Cherry-picked, and pushed an updated commit on top that reformats things, fixes
import order, and makes the {{DoubleSupplier}} change.
was (Author: iamaleksey):
bq. Modernise all of the RatioGauge construction as well, via a static method
that accepts a Supplier<Ratio>
Looks good. Can look better though. Might as well go all the way and make a
static method that accepts two {{DoubleSupplier}}s
bq. Replace requests with a Metered that proxies its calls to getX onto
hits.getX() + misses.getX()
Good call.
Cherry-picked, and pushed an updated commit on top that reformats things, fixes
import order, and makes the {{DoubleSupplier}} change.
> Clean up cache-related metrics
> ------------------------------
>
> Key: CASSANDRA-14628
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14628
> Project: Cassandra
> Issue Type: Improvement
> Reporter: Aleksey Yeschenko
> Assignee: Aleksey Yeschenko
> Priority: Minor
> Labels: virtual-tables
> Fix For: 4.0
>
>
> {{ChunkCache}} added {{CacheMissMetrics}} which is an almost exact duplicate
> of pre-existing {{CacheMetrics}}. I believe it was done initially because the
> authors thought there was no way to register hits with {{Caffeine}}, only
> misses, but that's not quite true. All we need is to provide a
> {{StatsCounter}} object when building the cache and update our metrics from
> there.
> The patch removes the redundant code and streamlines chunk cache metrics to
> use more idiomatic tracking.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]