diff options
author | Eliot Horowitz <eliot@10gen.com> | 2009-02-20 09:34:25 -0500 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2009-02-20 09:34:25 -0500 |
commit | 3f5102bf27fd120b696c78d16668c4ba2a5f0475 (patch) | |
tree | 681380deb679a5ef108511b5c1eb067a3739c8cd /jstests/_runner_leak.js | |
parent | b911ce8b250e3df57e8dd6e72cabd212972ef808 (diff) | |
download | mongo-3f5102bf27fd120b696c78d16668c4ba2a5f0475.tar.gz |
processinfo class and meminfo command, only works on darwin for the moment
Diffstat (limited to 'jstests/_runner_leak.js')
-rw-r--r-- | jstests/_runner_leak.js | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/jstests/_runner_leak.js b/jstests/_runner_leak.js new file mode 100644 index 00000000000..f4ed85f33c0 --- /dev/null +++ b/jstests/_runner_leak.js @@ -0,0 +1,33 @@ +// +// simple runner to run toplevel tests in jstests +// +var files = listFiles("jstests"); + +db.runCommand( "closeAllDatabases" ); + +prev = db.runCommand( "meminfo" ); + +files.forEach( + function(x) { + + if ( /_runner/.test(x.name) || + /_lodeRunner/.test(x.name) || + ! /\.js$/.test(x.name ) ){ + print(" >>>>>>>>>>>>>>> skipping " + x.name); + return; + } + + + print(" *******************************************"); + print(" Test : " + x.name + " ..."); + print(" " + Date.timeFunc( function() { load(x.name); }, 1) + "ms"); + + assert( db.getSisterDB( "admin" ).runCommand( "closeAllDatabases" ).ok == 1 , "closeAllDatabases failed" ); + var now = db.runCommand( "meminfo" ); + if ( now.virtual > prev.virtual ) + print( " LEAK : " + prev.virtual + " -->> " + now.virtual ); + prev = now; + } +); + + |