Created
August 10, 2015 06:31
-
-
Save fcamel/79673a206293a7b57c25 to your computer and use it in GitHub Desktop.
Test ndoe.js memory usage
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
/* | |
usage: nodejs test_memory_by_reading_file.js LARGE_FILE | |
It looks no memory limit for the process with node.js v0.10.38, | |
but single project cannot use more than ~2G. | |
*/ | |
var sleep = require('sleep'); | |
var fs = require('fs'); | |
var bs = []; | |
for (var i = 0; i < 10; i++) { | |
var b = fs.readFileSync(process.argv[2]); | |
console.log(b.toString()); | |
bs.push(b); | |
} | |
sleep.sleep(1000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment