-
Notifications
You must be signed in to change notification settings - Fork 55
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
poc: a metrics module for pebble #519
base: master
Are you sure you want to change the base?
Conversation
Some investigation into the default metrics that come with the Prometheus Go client: 1 List of Metrics from Go
|
A self-implemented metrics module for Pebble. I referred to the Prometheus Golang client a bit, not so much to runtime/metrics because it seems it's too complicated.
According to the spec, it seems we only need the counter type and the gauge type, but I added the histogram type anyway. Prometheus Golang client has more types but I don't think we will need it any time soon, so I ignored it.
Binary size doesn't increase (no extra libs used), still ~7.8MB with
-trimpath -ldflags='-s -w'
.Manual test:
Some basic unit test is added to make sure the functionalities work as expected and there is no deadlock issue.
TODO: investigate how the official Prometheus Golang client gathers basic metrics like CPU usage and stuff.