Skip to content

Instantly share code, notes, and snippets.

Created January 4, 2012 01:40
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Cube Metrics Client (Node.js + WebSockets)
var websocket = require("websocket");
var client = new websocket.client();
client.on("connect", function(connection) {
var remaining = 762; // based on start, stop, and step
connection.on("message", function(message) {
if (message.type === "utf8") {
if (!--remaining) connection.close();
expression: "sum(request)",
start: "2011-09-10T12:37:12Z",
stop: "2011-09-13T04:00:02Z",
step: 300000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment