Skip to content

Instantly share code, notes, and snippets.

@derpston
Created May 23, 2012 00:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save derpston/2772494 to your computer and use it in GitHub Desktop.
Save derpston/2772494 to your computer and use it in GitHub Desktop.
Node.js: sending memory usage data to Metricfire
// Send process memory usage to Metricfire every ten seconds.
var metricfire = require("metricfire");
metricfire.init("your-api-key");
setInterval(function(){
memusage = process.memoryUsage();
metricfire.send("memoryusage.rss", memusage.rss);
metricfire.send("memoryusage.heaptotal", memusage.heapTotal);
metricfire.send("memoryusage.heapused", memusage.heapUsed);
}, 10000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment