cpburnz / minecraft-prometheus-exporter

Prometheus exporter for Minecraft.
MIT License
44 stars 8 forks source link

Simple TPS #3

Closed RouNNdeL closed 3 years ago

RouNNdeL commented 3 years ago

I don't think I understand how the mc_server_tick_seconds_bucket and related entries work. I'd like to display a simple TPS stat of the server. I tried mc_server_tick_seconds_bucket{le=~"0.99"} / group_left on(pod,name) mc_server_tick_seconds_count{} * 20. To get the average TPS but It just does not seem right, as the 99th percentile value is constantly dropping. Can you provide example on how to use these entries to get the current TPS?

RouNNdeL commented 3 years ago

I think I've got it: rate(mc_server_tick_seconds_bucket{le="0.5"}[2m]), where 2m is the average time on the 50th percentile.