From 31de334be5a2cae99ac55fd0b2d148208bcf9c60 Mon Sep 17 00:00:00 2001 From: akvlad Date: Mon, 16 Oct 2023 13:18:10 +0300 Subject: [PATCH] #feat: prom series support --- lib/handlers/prom_series.js | 45 ++++++++------------------ promql/index.js | 61 +++++++++++++++++++++++++++++------- wasm_parts/main.go | 58 ++++++++++++++++++++++++++++------ wasm_parts/main.js | 20 ++++++++++++ wasm_parts/main.wasm.gz | Bin 2358040 -> 2358997 bytes 5 files changed, 131 insertions(+), 53 deletions(-) diff --git a/lib/handlers/prom_series.js b/lib/handlers/prom_series.js index 50f2c995..c581fa30 100644 --- a/lib/handlers/prom_series.js +++ b/lib/handlers/prom_series.js @@ -1,21 +1,8 @@ const { scanSeries } = require('../db/clickhouse') const { CORS } = require('../../common') -const { Compiler } = require('bnf') const { isArray } = require('handlebars-helpers/lib/array') const { QrynError } = require('./errors') - -const promqlSeriesBnf = ` - ::= | "{" "}" | "{" [] "}" -label ::= ( | "_") *( | "." | "_" | ) -operator ::= "=~" | "!~" | "!=" | "=" -quoted_str ::= () | () | | -metric_name ::= label -label_selector ::=