Skip to content
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

Statistics/metrics reporting #12

Open
oakad opened this issue Sep 8, 2017 · 3 comments
Open

Statistics/metrics reporting #12

oakad opened this issue Sep 8, 2017 · 3 comments

Comments

@oakad
Copy link

oakad commented Sep 8, 2017

For longer running caches it is critically important to be able to obtain operational metrics - number of cached items, rate of eviction, possibly some internal statistics. All decent caches thus provide a method to unintrusively obtain those in run-time.

Ccache should have something like that to be trusted in most production settings.

@karlseguin
Copy link
Owner

I think you're right, but I haven't done Go in a while and don't have time to tackle this. I might come back to Go if generics are added. I'd be willing to review and merge a PR, but I think a better solution might be to wrap the calls into a statistics tracker which does what you want; although I realize you'll be limited in what you can track without access to internals.

FWIW, while I still like ccache's core lru implementation, I think it grew too fat, trying to do too much. Layered caching, tracking, ... blah.

@oakad
Copy link
Author

oakad commented Sep 25, 2017

What a pity.

Whatever the shortcomings may be, ccache is the most decent cache available in Go. Alas, the alternatives are barely usable, feature-wise.

@karlseguin
Copy link
Owner

I know it's late. But you can now use GetDropped to get the rate of eviction. Will keep this open since there's obviously more that could be done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants