-
Notifications
You must be signed in to change notification settings - Fork 805
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add weighted size counter to caffeine instrumentation #1246
Comments
Great - PR would be welcome 😄 |
@zeitlinger While looking at the details of the metrics collected in Would you approve a change of metric type from |
Gauge seems to be correct, because the method returns the current accumulated value rather than a difference
|
@zeitlinger Semantically the eviction weight is also described in the
That is, each time there is an eviction:
Because of that, I do believe that In other words, if |
You're right 😄 @fstab do you think we can make a breaking change in a minor release? |
In case you are not comfortable with making a breaking change in a minor release (which is quite understandable!), I am willing to make any changes necessary to ease such a migration:
|
I feel we shouldn't make a breaking change in minor release. This breaks the contract of what should be contained in a minor |
@zeitlinger @dhoard @fstab: As mentioned in the corresponding PR, I consider that there are two changes that may break users of the
Here is my proposal for handling these changes:
|
here is some historical context fwiw, in case it is somehow helpful. The immutable The eviction weight was added in Caffeine by request of Apache Druid to optimize their deployments of their local / remote caches. The developer nicely summarized why the metric would be useful for his tuning. |
Hello,
I am using caffeine in a context where I am using a
Weigher
to bound the cache instance memory consumption.In that context, I find that the weighted size (which can be found on the
EvictionPolicy
object in caffeine) is an interesting statistic to track.I would be happy to author a PR to add that stat to
caffeine
instrumentation. (guava cache does not seem to expose an API that would make that statistic available)The text was updated successfully, but these errors were encountered: