question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incorrect putCount() implementation with CaffeineCacheMetrics

See original GitHub issue

In CaffeineCacheMetrics, the counter for put(…) is loadCount(). But the loadCount works with get(key, mappingFunc) , it seems not working with put(…)

    @Override
    protected long putCount() {
        return cache.stats().loadCount();
    }

I did not see any call to cache().statsCounter().recordPutSuccess() or recordLoadSuccess() in put(…)

Guess I misunderstood something? Shall we have a recordPutSuccess() and a putCount() method in CaffeineCacheMetrics?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
izeyecommented, Aug 22, 2020

We might want to change it in a new feature release though.

I created https://github.com/micrometer-metrics/micrometer/issues/2242 for this.

1reaction
shakuzencommented, Oct 27, 2020

Thank you everyone for bringing this to our attention and providing the helpful details. With @izeye’s update to the JavaDoc, I’ll close this and we can follow-up with #2242.

Read more comments on GitHub >

github_iconTop Results From Across the Web

CaffeineCacheMetrics (micrometer-core 1.0.3 API) - Javadoc.io
Record metrics on a Caffeine cache. protected long, putCount(). The put mechanism is unimportant - this count applies to entries added to the...
Read more >
MicronautCaffeineCacheMetrics (micrometer 1.2.1 API)
Record metrics on a Caffeine cache. protected long, putCount(). protected java.lang.Long, size() ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found