Nebulas metrics system is based on the go-metrics library. We use influxdb to store the metrics data. And we use grafana to fetch data from the InfluxDB database and draw diagrams.
Creating and updating metrics
Metrics can be created and updated equally simply:
meter := metrics.NewMeter(metername)
timer := metrics.NewTimer(timername)
meter.Mark(n) // Record the occurrence of `n` events
timer.Update(duration) // Record an event that took `duration`
timer.UpdateSince(time) // Record an event that started at `time`
metrics data display on grafana
Now we have add some necessary metrics in Nebulas. But we need more.
Nebulas metrics system is based on the
go-metrics
library. We useinfluxdb
to store the metrics data. And we usegrafana
to fetch data from the InfluxDB database and draw diagrams.Creating and updating metrics
Metrics can be created and updated equally simply:
metrics data display on
grafana
Now we have add some necessary metrics in Nebulas. But we need more.