Skip to content

Instantly share code, notes, and snippets.

@sota1235
Last active November 2, 2018 09:55
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 sota1235/89c4ba346c6274828cc8e5c21f15cb59 to your computer and use it in GitHub Desktop.
Save sota1235/89c4ba346c6274828cc8e5c21f15cb59 to your computer and use it in GitHub Desktop.

Command

node --inspect index.js
const expArr = require('./test.js');
const INTERVAL_MSEC = 1000;
const print = () => {
console.log(expArr.length);
};
const printInterval = () => {
setTimeout(() => {
print();
setTimeout(printInterval, INTERVAL_MSEC);
}, INTERVAL_MSEC);
};
printInterval();
function create() {
console.log('create array');
const arr = [];
for (let i = 0; i < 100000; i++) {
arr.push('hogeeeeeee');
}
return arr;
}
const expArr = create();
module.exports = expArr;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment