void buildCollection() { BSONObj info; // Create a collection with specified extent sizes BSONObj command = BSON( "create" << collname() << "capped" << true << "$nExtents" << extentSizes() << "autoIndexId" << false ); ASSERT(client()->runCommand(dbname(), command, info)); // Populate documents. for(int i = 0; i < numDocs(); ++i) { client()->insert(ns(), BSON( "_id" << i << "ts" << i << "payload" << payload8k() )); } }
int32_t IndexReader::numDeletedDocs() { return (maxDoc() - numDocs()); }