Permalink
Browse files

Issue meminfo cmd from dummy db

  • Loading branch information...
astaple committed Feb 20, 2009
1 parent cf2a728 commit 7d0d3c52936cf04e0645f09d4b72dc03f5ef9862
Showing with 28 additions and 12 deletions.
  1. +8 −6 jstests/_runner_leak.js
  2. +8 −6 jstests/_runner_leak_nojni.js
  3. +12 −0 mongo.xcodeproj/project.pbxproj
View
@@ -3,8 +3,10 @@
//
var files = listFiles("jstests");
-db.getSisterDB( "admin" ).runCommand( "closeAllDatabases" );
-prev = db.runCommand( "meminfo" );
+var dummyDb = db.getSisterDB( "dummyDBdummydummy" );
+
+dummyDb.getSisterDB( "admin" ).runCommand( "closeAllDatabases" );
+prev = dummyDb.runCommand( "meminfo" );
print( "START : " + tojson( prev ) );
@@ -23,8 +25,8 @@ files.forEach(
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" );
+ assert( dummyDb.getSisterDB( "admin" ).runCommand( "closeAllDatabases" ).ok == 1 , "closeAllDatabases failed" );
+ var now = dummyDb.runCommand( "meminfo" );
if ( now.virtual > prev.virtual )
print( " LEAK : " + prev.virtual + " -->> " + now.virtual );
prev = now;
@@ -33,5 +35,5 @@ files.forEach(
-db.getSisterDB( "admin" ).runCommand( "closeAllDatabases" );
-print( "END : " + tojson( db.runCommand( "meminfo" ) ) );
+dummyDb.getSisterDB( "admin" ).runCommand( "closeAllDatabases" );
+print( "END : " + tojson( dummyDb.runCommand( "meminfo" ) ) );
@@ -3,8 +3,10 @@
//
var files = listFiles("jstests");
-db.getSisterDB( "admin" ).runCommand( "closeAllDatabases" );
-prev = db.runCommand( "meminfo" );
+var dummyDb = db.getSisterDB( "dummyDBdummydummy" );
+
+dummyDb.getSisterDB( "admin" ).runCommand( "closeAllDatabases" );
+prev = dummyDb.runCommand( "meminfo" );
print( "START : " + tojson( prev ) );
@@ -26,8 +28,8 @@ files.forEach(
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" );
+ assert( dummyDb.getSisterDB( "admin" ).runCommand( "closeAllDatabases" ).ok == 1 , "closeAllDatabases failed" );
+ var now = dummyDb.runCommand( "meminfo" );
if ( now.virtual > prev.virtual )
print( " LEAK : " + prev.virtual + " -->> " + now.virtual );
prev = now;
@@ -36,5 +38,5 @@ files.forEach(
-db.getSisterDB( "admin" ).runCommand( "closeAllDatabases" );
-print( "END : " + tojson( db.runCommand( "meminfo" ) ) );
+dummyDb.getSisterDB( "admin" ).runCommand( "closeAllDatabases" );
+print( "END : " + tojson( dummyDb.runCommand( "meminfo" ) ) );
@@ -207,6 +207,12 @@
93A8D2100F37544800C92B85 /* update2.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = update2.js; sourceTree = "<group>"; };
93A8D2110F37544800C92B85 /* where1.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = where1.js; sourceTree = "<group>"; };
93A8D8200F38FE2400C92B85 /* autoid.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = autoid.js; sourceTree = "<group>"; };
+ 93AB914E0F4F1C7A0020A046 /* javajstests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = javajstests.cpp; sourceTree = "<group>"; };
+ 93AB914F0F4F1C970020A046 /* _runner_leak.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = _runner_leak.js; sourceTree = "<group>"; };
+ 93AB91500F4F1C970020A046 /* _runner_leak_nojni.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = _runner_leak_nojni.js; sourceTree = "<group>"; };
+ 93AB91510F4F1C970020A046 /* _runner_sharding.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = _runner_sharding.js; sourceTree = "<group>"; };
+ 93AB91520F4F1C970020A046 /* eval1.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = eval1.js; sourceTree = "<group>"; };
+ 93AB91530F4F1C970020A046 /* eval2.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = eval2.js; sourceTree = "<group>"; };
93AF75500F216D0300994C66 /* jsontests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = jsontests.cpp; sourceTree = "<group>"; };
93B4A81A0F1C01B4000C862C /* security.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = security.cpp; sourceTree = "<group>"; };
93B4A81B0F1C01D8000C862C /* lasterror.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lasterror.cpp; sourceTree = "<group>"; };
@@ -302,6 +308,7 @@
934223850EF16D7000608550 /* dbtests */ = {
isa = PBXGroup;
children = (
+ 93AB914E0F4F1C7A0020A046 /* javajstests.cpp */,
932AC3EB0F4A5B34005BF8B0 /* queryoptimizertests.cpp */,
933E22100F4327B2000209E3 /* perf */,
937D0E340F28CB070071FFA9 /* repltests.cpp */,
@@ -480,6 +487,11 @@
93A8D1D10F37544800C92B85 /* jstests */ = {
isa = PBXGroup;
children = (
+ 93AB914F0F4F1C970020A046 /* _runner_leak.js */,
+ 93AB91500F4F1C970020A046 /* _runner_leak_nojni.js */,
+ 93AB91510F4F1C970020A046 /* _runner_sharding.js */,
+ 93AB91520F4F1C970020A046 /* eval1.js */,
+ 93AB91530F4F1C970020A046 /* eval2.js */,
93F386400F40E27800967EFA /* hint1.js */,
936ABBAA0F3CBE5400D5015F /* recovery */,
936AB9350F3C8AB800D5015F /* _lodeRunner.js */,

0 comments on commit 7d0d3c5

Please sign in to comment.