Skip to content

Add a loadable TS.* time-series module - #60

Merged
GoDeskio merged 1 commit into
unstablefrom
cursor/timeseries-module-afeb
Nov 5, 2026
Merged

GoDeskio merged 1 commit into
unstablefrom
cursor/timeseries-module-afeb

Conversation

@GoDeskio

Copy link
Copy Markdown
Owner

Summary

  • Adds modules/timeseries, a loadable module with the usual TS.* commands: create, add, madd, get, range, revrange, mrange, del, and label updates.
  • Samples sit in about-4KB chunks compressed with delta-of-delta timestamps and XOR'd doubles, following the published Gorilla paper (Pelkonen et al., SIGMOD 2015). The bit layout is ours; it is not taken from another time-series product.
  • Range queries support avg, sum, min, max, count, first, and last over a bucket. TS.MRANGE filters on labels. Retention drops samples older than the newest timestamp minus the window. RDB and AOF rewrite restore the series.

Tests

  • modules/timeseries/chunk_test: compression round-trip fuzz, aggregation against a naive bucket implementation, and a 1,000,000-point check (about 6.1 bytes/sample, under 8MB).
  • tests/unit/timeseries.tcl: command behavior, duplicate policies, label filters, retention, RDB reload, and AOF rewrite.
  • make -j and make test: 5890 passed, 0 failed.

Do not merge or deploy until Dustin says so.

Open in Web Open in Cursor 

Chunked Gorilla-style delta-of-delta and XOR compression, with range
aggregation, label filters, retention, and RDB/AOF persistence. The
compressor follows the published Gorilla paper and is not taken from
another time-series product.

Co-authored-by: Admin <GoDeskio@users.noreply.github.com>
@GoDeskio
GoDeskio force-pushed the cursor/timeseries-module-afeb branch from 8663d51 to 3f1520c Compare November 5, 2026 10:49
@GoDeskio
GoDeskio merged commit 0b9a342 into unstable Nov 5, 2026
54 of 95 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant