Created
June 8, 2013 00:05
-
-
Save isaacs/5733238 to your computer and use it in GitHub Desktop.
This file contains 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
$ cat t.js | |
gc(); | |
var before = process.memoryUsage(); | |
var express = require(process.argv[2]); | |
gc(); | |
var after = process.memoryUsage(); | |
var diff = {} | |
for (var i in before) diff[i] = after[i] - before[i] | |
console.log(before) | |
console.log(after) | |
console.log(diff) | |
$ node --expose-gc t.js express | |
{ rss: 11915264, heapTotal: 6163968, heapUsed: 1460672 } | |
{ rss: 19935232, heapTotal: 10324992, heapUsed: 3298312 } | |
{ rss: 8019968, heapTotal: 4161024, heapUsed: 1837640 } | |
$ node --expose-gc t.js request | |
{ rss: 11804672, heapTotal: 6163968, heapUsed: 1460672 } | |
{ rss: 20979712, heapTotal: 15551232, heapUsed: 4157032 } | |
{ rss: 9175040, heapTotal: 9387264, heapUsed: 2696360 } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So request is heavier than express, haha.
How about superagent?