mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 01:21:03 +01:00
21 lines
387 B
JavaScript
21 lines
387 B
JavaScript
|
|
t = db.cursor1
|
|
t.drop();
|
|
|
|
big = "";
|
|
while ( big.length < 50000 )
|
|
big += "asdasdasdasdsdsdadsasdasdasD";
|
|
|
|
num = Math.ceil( 10000000 / big.length );
|
|
|
|
for ( var i=0; i<num; i++ ){
|
|
t.save( { num : i , str : big } );
|
|
}
|
|
|
|
assert.eq( num , t.find().count() );
|
|
assert.eq( num , t.find().itcount() );
|
|
|
|
assert.eq( num / 2 , t.find().limit(num/2).itcount() );
|
|
|
|
t.drop(); // save some space
|