Giriş
Açıklaması şöyle
RedisTimeSeries is a Redis Module that brings native Time Series data structure to Redis. Time Series solutions which were earlier built on top of Sorted Sets (or Redis Streams) can benefit from RedisTimeSeries features such as high volume inserts, low latency reads, flexible query language, down-sampling and much more!
TS.ADD
Örnek
Şöyle yaparız
# temperature for device 2 in location 3 along with labelsTS.ADD temp:3:2 * 20 LABELS metric temp location 3 device 2 # pressure for device 2 in location 3 TS.ADD pressure:3:2 * 60 LABELS metric pressure location 3 device 2`
TS.GET
Örnek
Şöyle yaparız
# pressure in device 5 for location 1TS.GET pressure:1:5# temperature in device 5 for location 4TS.GET temp:4:5
TS.MRANGE
Ortalamayı gösterir
Örnek
Açıklaması şöyle
Extract temp and pressure for all devices in one or more locations within a specific time range:
Şöyle yaparız
TS.MRANGE - + WITHLABELS FILTER location=3TS.MRANGE - + WITHLABELS FILTER location=(3,5)
Hiç yorum yok:
Yorum Gönder