Skip to content
forked from heapwolf/tsd

spins up a server to receive time-series data via tcp streams and then graph it in the browser via web-sockets

Notifications You must be signed in to change notification settings

juliangruber/tsd

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NAME

stshttp(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');

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.

About

spins up a server to receive time-series data via tcp streams and then graph it in the browser via web-sockets

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%