summaryrefslogtreecommitdiff
path: root/jstests/profile2.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/profile2.js')
-rw-r--r--jstests/profile2.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/jstests/profile2.js b/jstests/profile2.js
new file mode 100644
index 0000000..929b463
--- /dev/null
+++ b/jstests/profile2.js
@@ -0,0 +1,19 @@
+print("profile2.js BEGIN");
+
+try {
+
+ assert.commandWorked( db.runCommand( {profile:2} ) );
+
+ huge = 'huge';
+ while (huge.length < 2*1024*1024){
+ huge += huge;
+ }
+
+ db.profile2.count({huge:huge}) // would make a huge entry in db.system.profile
+
+ print("profile2.js SUCCESS OK");
+
+} finally {
+ // disable profiling for subsequent tests
+ assert.commandWorked( db.runCommand( {profile:0} ) );
+}