Created
May 23, 2012 00:20
-
-
Save derpston/2772494 to your computer and use it in GitHub Desktop.
Node.js: sending memory usage data to Metricfire
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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