summaryrefslogtreecommitdiff
path: root/jstests/profile2.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/profile2.js')
-rw-r--r--jstests/profile2.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/jstests/profile2.js b/jstests/profile2.js
index 929b463ca3d..1006c03a40d 100644
--- a/jstests/profile2.js
+++ b/jstests/profile2.js
@@ -1,12 +1,17 @@
print("profile2.js BEGIN");
+// special db so that it can be run in parallel tests
+var stddb = db;
+var db = db.getSisterDB("profile2");
+
try {
assert.commandWorked( db.runCommand( {profile:2} ) );
- huge = 'huge';
+ var str = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
+ huge = str;
while (huge.length < 2*1024*1024){
- huge += huge;
+ huge += str;
}
db.profile2.count({huge:huge}) // would make a huge entry in db.system.profile
@@ -16,4 +21,5 @@ try {
} finally {
// disable profiling for subsequent tests
assert.commandWorked( db.runCommand( {profile:0} ) );
+ db = stddb;
}