|
|
@@ -1,11 +1,12 @@
|
|
|
|
|
|
|
|
|
+SELECT id,prom.time('2024-01-01 09:09:09.090', '2024-01-03 19:19:19.191').find(name='test1').unit('sum','1d') FROM /test/bucketpromdb where id='bucketpromdb:wecisen1'
|
|
|
+-- 测试数据保留 7 天,在类定义中 bucket.ttl=7
|
|
|
+/**
|
|
|
+output()
|
|
|
+matchcount(id, "bucketpromdb:wecisen1", "prom.1.2", 2880, 1)
|
|
|
+**/
|
|
|
+;
|
|
|
|
|
|
|
|
|
|
|
|
@@ -80,3 +81,42 @@ match("a.id","bucketpromdb:wecisen1","a.prom.len",1,"a.prom.0.2",1)
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
+SELECT id,prom.time('2024-01-02 00:00:00', '2024-01-10 00:00:00').avg().groupby('name')
|
|
|
+FROM /test/bucketpromdb
|
|
|
+WHERE prom.time('2024-01-03 00:00:00', '2024-01-08 00:00:00').avg().groupby('name').assert(avg=1)
|
|
|
+/**
|
|
|
+timeout(60m)
|
|
|
+output()
|
|
|
+match("prom.0.0","test1","prom.0.3",1)
|
|
|
+**/
|
|
|
+;
|
|
|
+
|
|
|
+SELECT id,prom.time('2024-01-02 00:00:00', '2024-01-10 00:00:00').avg().groupby('name')
|
|
|
+FROM /test/bucketpromdb
|
|
|
+WHERE prom.time('2024-01-03 00:00:00', '2024-01-08 00:00:00').avg().groupby('name').assert($1=1)
|
|
|
+/**
|
|
|
+timeout(60m)
|
|
|
+output()
|
|
|
+match("prom.0.0","test1","prom.0.3",1)
|
|
|
+**/
|
|
|
+;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+select id,prom.avg().groupby(name) from(
|
|
|
+ SELECT id,prom.time('2024-01-02 00:00:00', '2024-01-10 00:00:00')
|
|
|
+ FROM /test/bucketpromdb
|
|
|
+ WHERE prom.time('2024-01-03 00:00:00', '2024-01-08 00:00:00').avg().groupby(name).assert($1=1)
|
|
|
+)
|
|
|
+/**
|
|
|
+timeout(60m)
|
|
|
+output()
|
|
|
+match("prom.0.0","test1","prom.0.3",1)
|
|
|
+**/
|
|
|
+;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|