Skip to content

A Timeseries Database in Node.js, backed by LevelDB. It is unrelated to the Amazon Timestream service that was announced 5 years after I created this.

License

Notifications You must be signed in to change notification settings

brycebaril/timestreamdb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

timestreamdb

NPM

Super early alpha version!

Docs coming, there is a LOT in there. Uses timestream for a query engine.

Supports joins, aggregates, map operations, filters...

var TsDB = require("timestreamdb")
var level = require("level")

var orig = level("./testdb", {valueEncoding: "json"})

var statware = require("statware")

// Using statware to make some numbers to look at...
var stats = statware()
stats.registerHelper(statware.memstats)
stats.registerHelper(statware.procstats)
stats.registerHelper(statware.sysstats)

var db = TsDB(orig)

setInterval(function () {
  stats.getStats(function (s) {
    db.put("foo", s)
  })
}, 100)

setInterval(function () {
  db.ts("foo")
    .flatten()
    .numbers()
    .mean(1000)
    .toArray(console.log)
}, 1000)

API

Docs coming soon! Take a peek at timestream for query docs.

LICENSE

MIT

About

A Timeseries Database in Node.js, backed by LevelDB. It is unrelated to the Amazon Timestream service that was announced 5 years after I created this.

Resources

License

Stars

Watchers

Forks

Packages

No packages published