0.1.2 • Published 11 years ago

tsd-web v0.1.2

Weekly downloads
2
License
-
Repository
-
Last release
11 years ago

NAME

tsd-web(3)

SYNOPSIS

Spin up a quick server to visualize time series data.

USAGE

Deadly simple. just specify where you want it and what keys it should care about.

var tsd = require('tsd-web');

tsd({
  ports: {
    http: 80,
    tcp: 9099
  },
  keys: ['hello', 'goodbye', 'ohai', 'neat-stuff']
});

Write some dummy data to the socket (LINE DELIMITED!).

var net = require('net');
var x = 10;
var client = net.connect({ port: 9099 }, function() {

  function write(json) {
    client.write(JSON.stringify(json) + '\n');
  }
  
  setInterval(function() {

    x += x;

    write({ key: 'hello',   value: Math.random() * x });
    write({ key: 'goodbye', value: Math.random() * x });
    write({ key: 'ohai', value: Math.random() * x });
    write({ key: 'neat-stuff', value: Math.random() * x });

  }, 150);

});

WUT?

screenshot

TODO

This is a work in progress. Pull requests welcome.

  • Provide a way to flush the cache.
0.1.2

11 years ago

0.1.0

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago