ilusm.dev

ts

Time series, TSDB, metrics storage, forecasting.

Load with: use ts

Quick example

use ts

result = tsne("hello", "hello")
prn(result)

Functions

Series

tsne(name, tags)

Creates a new instance. Takes name, tags.

tsadd(s, v, t)

Performs the operation. Takes s, v, t.

tsddr(s, vals, st, step)

Performs the operation. Takes s, vals, st, step.

Query

tsrng(s, st, ed)

Performs the operation. Takes s, st, ed.

tsggr(s, win, fn)

Performs the operation. Takes s, win, fn.

tsdwn(s, fac, fn)

Performs the operation. Takes s, fac, fn.

Stats

tsmen(s)

Encodes. Takes s.

tsstd(s)

Performs the operation. Takes s.

tsmin(s)

Initialises. Takes s.

tsmax(s)

Performs the operation. Takes s.

tscnt(s)

Performs the operation. Takes s.

tsrte(s, win)

Performs the operation. Takes s, win.

Transform

tsdrv(s)

Performs the operation. Takes s.

tsntg(s)

Performs the operation. Takes s.

tssmt(s, win)

Performs the operation. Takes s, win.

Forecasting

tsfr1(s, hor, win)

Performs the operation. Takes s, hor, win.

tsfrc(s, hor, alpha)

Performs the operation. Takes s, hor, alpha.

tsfr0(s, hor)

Performs the operation. Takes s, hor.

Anomaly detection

tsnmz(s, thresh)

Performs the operation. Takes s, thresh.

tsnmq(s)

Performs the operation. Takes s.

Storage

ts2js(s)

Performs the operation. Takes s.

tsfrm(j)

Removes an item. Takes j.

ts2cs(s, path)

Performs the operation. Takes s, path.

tsfr2(path)

Performs the operation. Takes path.

InfluxDB line protocol

ts2nf(s)

Performs the operation. Takes s.

Prometheus format

ts2pr(s)

Processes or prints. Takes s.

Join/merge

tsjon(a, b, fn)

Performs the operation. Takes a, b, fn.

tsmrg(ss)

Performs the operation. Takes ss.

Window functions

tswnm(s, win, fn)

Performs the operation. Takes s, win, fn.

Notes

  • TypeScript-style type annotations and checking for ilusm.