dgraph-io / ristretto

A high performance memory-bound Go cache

Home Page:https://dgraph.io/blog/post/introducing-ristretto-high-perf-go-cache/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

more structured access to metrics.

tcolgate opened this issue · comments

Metrics returns a private type that doesn't show it's methods in the GoDoc. Ideally I'd like to be able to expose the metrics to a prometheus collector. It looks like I could possibly parse some string formatted output, but, ideally, I'd be able to get a current set of structuted mwtrics from the call.

Yea, I see no reason why we can't expose all of it publicly.

The metrics structure is pretty clear that it doesn't want anyone looking at it :) How about having the Metrics() call return a different type with a snapshot of the internal numbers?