summaryrefslogtreecommitdiff
path: root/speed.js
diff options
context:
space:
mode:
authordwight <dwight@10gen.com>2011-07-15 14:14:08 -0400
committerdwight <dwight@10gen.com>2011-08-02 02:36:36 -0400
commit81fece68e9b0f1723b9c5d2e468fd2e43794022d (patch)
tree5f0dbfd3421d63ca8108f7e4e832c6437614be6d /speed.js
parentb1a62743d1ab7f1986bbe7faf36640fc16236b15 (diff)
downloadmongo-81fece68e9b0f1723b9c5d2e468fd2e43794022d.tar.gz
prefetch type stuff
Diffstat (limited to 'speed.js')
-rwxr-xr-xspeed.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/speed.js b/speed.js
new file mode 100755
index 00000000000..c5aa3a36964
--- /dev/null
+++ b/speed.js
@@ -0,0 +1,13 @@
+t = db.fooo;
+t.drop();
+x = { str:'aaaabbbbcc' }
+s = new Date();
+for( var i = 0; i < 100000; i++ ) {
+ x.i = i;
+ t.insert(x);
+}
+print( (new Date())-s );
+t.ensureIndex({x:1});
+t.ensureIndex({str:1});
+print( (new Date())-s );
+