ccache icon indicating copy to clipboard operation
ccache copied to clipboard

Statistics/metrics reporting

Open oakad opened this issue 6 years ago • 3 comments

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.

oakad avatar Sep 08 '17 04:09 oakad

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.

karlseguin avatar Sep 23 '17 05:09 karlseguin

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.

oakad avatar Sep 25 '17 01:09 oakad

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.

karlseguin avatar Feb 16 '20 03:02 karlseguin