summaryrefslogtreecommitdiff
path: root/jstests/core/capped_max1.js
diff options
context:
space:
mode:
authorEric Milkie <milkie@10gen.com>2014-12-22 10:39:25 -0500
committerEric Milkie <milkie@10gen.com>2014-12-23 09:13:15 -0500
commit8a0987a81b10c9b5559170bfc00a6292eefe3866 (patch)
tree34251ea278443e7b1ae02917bf73caf84966e534 /jstests/core/capped_max1.js
parent8a88494748dce0aa09471f1b66e409cf6c2d7ff2 (diff)
downloadmongo-8a0987a81b10c9b5559170bfc00a6292eefe3866.tar.gz
SERVER-16245 expose index statistics on WiredTiger
Diffstat (limited to 'jstests/core/capped_max1.js')
-rw-r--r--jstests/core/capped_max1.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/jstests/core/capped_max1.js b/jstests/core/capped_max1.js
index 5fe3aa244e0..2dda716c8d2 100644
--- a/jstests/core/capped_max1.js
+++ b/jstests/core/capped_max1.js
@@ -4,13 +4,14 @@ t = db.capped_max1;
t.drop();
max = 10;
-
-db.createCollection( t.getName() , {capped: true, size: 64 * 1024, max: max } );
+maxSize = 64 * 1024;
+db.createCollection( t.getName() , {capped: true, size: maxSize, max: max } );
assert.eq( max, t.stats().max );
+assert.eq( maxSize, t.stats().maxSize );
+assert.eq( Math.floor(maxSize/1000), t.stats(1000).maxSize );
for ( var i=0; i < max * 2; i++ ) {
t.insert( { x : 1 } );
}
assert.eq( max, t.count() );
-