bairhys / prometheus-frigate-exporter

A Prometheus exporter for Frigate stats
MIT License
33 stars 4 forks source link

Number of decimal places for inference time #8

Closed 1Kris closed 6 months ago

1Kris commented 6 months ago

It appears as though the Frigate API is showing inference time as milliseconds with two decimal places, like: "inference_speed": 6.79,

However, the exporter is showing it as seconds, with insufficient decimal places.
frigate_detector_inference_speed_seconds{name="coral1"} 0.007

It would be helpful to add two more decimal places to that value so we can see proper data granularity.

I see similar is true for Device Temperature, GPU Utilization, maybe others.

This is a great tool, thank you for that, and for your support with this.

bairhys commented 6 months ago

Thanks for opening this issue @1Kris! All decimal places are now exported. An update has been pushed to Docker Hub.

1Kris commented 6 months ago

It looks fabulous now, thanks! You can close this as you wish of course.

I see you didn't skimp on the digits.
frigate_detector_inference_speed_seconds{name="coral1"} 0.007019999999999999

It is interesting that Frigate Other Processes memory utilization jumped from 4.5% to 7.3% coincident with the change. Nothing big, but surprising that it changed at all.

My only other desire may be a Mean line for Inference time, but I am not sure that it is feasible.

bairhys commented 6 months ago

That's great. I didn't notice the numbers were not getting read fully until you mentioned it so thanks for that! Much better now.

It is easy to add a mean line in Grafana. Need to add a new query dataset to the inference graph: avg_over_time(frigate_detector_inference_speed_seconds[30m]). This does a rolling average over 30mins. Or actually I have added a mean line for the inference speed to my dashboard. The updated dashboard is here.