-
-
Save adamlogic/4e9a89bc57471ed25d001bbbef39710f to your computer and use it in GitHub Desktop.
Judoscale queries
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT | |
| time_bucket('PT10S'::interval, adapter_metrics."time") AS bucket, | |
| adapter_metrics.adapter_token, | |
| adapter_metrics.metric_type, | |
| adapter_metrics.queue, | |
| ((sum(adapter_metrics.sum))::double precision /(sum(adapter_metrics.count))::double precision) AS avg_value, | |
| max(adapter_metrics.max_value) AS max_value, | |
| sum(adapter_metrics.count) AS count | |
| FROM | |
| adapter_metrics | |
| GROUP BY | |
| (time_bucket('PT10S'::interval, adapter_metrics."time")), | |
| adapter_metrics.adapter_token, | |
| adapter_metrics.metric_type, | |
| adapter_metrics.queue |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT | |
| time_bucket_gapfill('10 seconds', bucket) AS time, | |
| coalesce(sum(count) / 10.0, 0) | |
| FROM | |
| "adapter_metrics_rollup" | |
| WHERE | |
| "adapter_metrics_rollup"."adapter_token" = '478e7c3a-a8f6-4803-af3b-e6fb29a567b9' | |
| AND "adapter_metrics_rollup"."bucket" >= '2024-05-06 16:13:30' | |
| AND "adapter_metrics_rollup"."bucket" < '2024-05-06 16:33:50' | |
| AND "adapter_metrics_rollup"."queue" IS NULL | |
| AND "adapter_metrics_rollup"."metric_type" = 'queue_time' | |
| GROUP BY | |
| time |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment