You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The computercraft_server_tasks_s_bucket and computercraft_task_time_s_bucket metrics only ever have data in the +Inf bucket. My suspicion is that the metrics system collects data in nanoseconds, but since the buckets are defined in seconds, all the data always ends up being higher than 0.25. This results in the metrics being unusable for histogram and heatmap visualisations.
This can be tested on the sc3 staff-analytics with queries such as sum by (le) (computercraft_task_time_s_bucket[1m]) and sum by (le) (rate(computercraft_server_tasks_s_bucket[1m])).
This does not affect CC's own commands as the times are always formatted back as seconds:
The
computercraft_server_tasks_s_bucket
andcomputercraft_task_time_s_bucket
metrics only ever have data in the+Inf
bucket. My suspicion is that the metrics system collects data in nanoseconds, but since the buckets are defined in seconds, all the data always ends up being higher than 0.25. This results in the metrics being unusable for histogram and heatmap visualisations.For example:
cc-prometheus/common/src/main/java/cc/tweaked/prometheus/collectors/ComputerFieldCollector.java
Lines 43 to 46 in 109de72
https://github.com/cc-tweaked/CC-Tweaked/blob/54b7366b2ddbb0ee024e0b06ff3b9d300580e554/projects/core/src/main/java/dan200/computercraft/core/metrics/Metrics.java#L14-L15
This can be tested on the sc3 staff-analytics with queries such as
sum by (le) (computercraft_task_time_s_bucket[1m])
andsum by (le) (rate(computercraft_server_tasks_s_bucket[1m]))
.This does not affect CC's own commands as the times are always formatted back as seconds:
https://github.com/cc-tweaked/CC-Tweaked/blob/54b7366b2ddbb0ee024e0b06ff3b9d300580e554/projects/core/src/main/java/dan200/computercraft/core/metrics/Metric.java#L108-L110
The text was updated successfully, but these errors were encountered: