Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 9613b541 authored by Simon Delamare's avatar Simon Delamare
Browse files

db: Fix as_rate calculation in get_metrics function

parent c7870728
No related branches found
No related tags found
No related merge requests found
...@@ -387,7 +387,7 @@ if as_rate: ...@@ -387,7 +387,7 @@ if as_rate:
"END / EXTRACT(epoch FROM timestamp - LAG(timestamp) OVER w) AS value, " \ "END / EXTRACT(epoch FROM timestamp - LAG(timestamp) OVER w) AS value, " \
"labels " \ "labels " \
"FROM cte " \ "FROM cte " \
"WINDOW w AS (PARTITION BY metric_id, device_id, labels) "\ "WINDOW w AS (PARTITION BY metric_id, device_id, labels ORDER BY timestamp ASC) "\
"ORDER BY timestamp ASC" "ORDER BY timestamp ASC"
plpy.info(req) plpy.info(req)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment