stshttp(3)
Spin up a quick server to visualize time series data.
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);
});
This is a work in progress. Pull requests welcome.
- Provide a way to flush the cache.