这篇教程C++ testNs函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中testNs函数的典型用法代码示例。如果您正苦于以下问题:C++ testNs函数的具体用法?C++ testNs怎么用?C++ testNs使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了testNs函数的23个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: String String() : ns_( testNs( this ) ) { for( int i = 0; i < 100000; ++i ) { stringstream ss; ss << i; client_->insert( ns_.c_str(), BSON( "a" << ss.str() ) ); } }
开发者ID:DjComandos,项目名称:mongo,代码行数:7,
示例2: TenIndex TenIndex() : ns_( testNs( this ) ) { const char *names = "aaaaaaaaa"; for( int i = 0; i < 9; ++i ) { client_->resetIndexCache(); client_->ensureIndex( ns_.c_str(), BSON( "_id" << 1 ), false, names + i ); } }
开发者ID:DjComandos,项目名称:mongo,代码行数:7,
示例3: ObjectId ObjectId() : ns_( testNs( this ) ) { OID id; for( int i = 0; i < 100000; ++i ) { id.init(); client_->insert( ns_.c_str(), BSON( "a" << id ) ); } }
开发者ID:DjComandos,项目名称:mongo,代码行数:7,
示例4: Query Query() : ns_( testNs( this ) ) { const char *names = "aaaaaaaaaa"; for( int i = 0; i < 10; ++i ) { client_->resetIndexCache(); client_->ensureIndex( ns_.c_str(), BSON( ( names + i ) << 1 ), false, names + i ); } lk_.reset( new Lock::GlobalWrite ); }
开发者ID:DjComandos,项目名称:mongo,代码行数:8,
示例5: NoMatchLong NoMatchLong() : ns_( testNs( this ) ) { const char *names = "aaaaaaaaaa"; for( int i = 0; i < 100000; ++i ) { BSONObjBuilder b; for( int j = 0; j < 10; ++j ) b << ( names + j ) << i; client_->insert( ns_.c_str(), b.obj() ); } }
开发者ID:DjComandos,项目名称:mongo,代码行数:9,
示例6: Hint Hint() : ns_( testNs( this ) ) { const char *names = "aaaaaaaaa"; for( int i = 0; i < 9; ++i ) { client_->resetIndexCache(); client_->ensureIndex( ns_.c_str(), BSON( ( names + i ) << 1 ), false, names + i ); } _lk.reset( new Lock::GlobalWrite ); _ctx.reset( new Client::Context( ns_ ) ); hint_ = BSON( "hint" << BSON( "a" << 1 ) ); }
开发者ID:DjComandos,项目名称:mongo,代码行数:10,
示例7: Hint Hint() : ns_( testNs( this ) ) { const char *names = "aaaaaaaaa"; for( int i = 0; i < 9; ++i ) { client_->resetIndexCache(); client_->ensureIndex( ns_.c_str(), BSON( ( names + i ) << 1 ), false, names + i ); } lk_.reset( new dblock ); Client::Context ctx( ns_ ); hint_ = BSON( "hint" << BSON( "a" << 1 ) ); }
开发者ID:gerald-lindsly,项目名称:mongo,代码行数:10,
示例8: Object Object() : ns_( testNs( this ) ) { for( int i = 0; i < 100000; ++i ) { client_->insert( ns_.c_str(), BSON( "a" << BSON( "a" << i ) ) ); } }
开发者ID:DjComandos,项目名称:mongo,代码行数:5,
示例9: Count Count() : ns_( testNs( this ) ) { BSONObj obj = BSON( "a" << 1 ); for( int i = 0; i < 100000; ++i ) client_->insert( ns_, obj ); }
开发者ID:DjComandos,项目名称:mongo,代码行数:5,
示例10: CountSimpleIndex CountSimpleIndex() : ns_( testNs( this ) ) { BSONObj obj = BSON( "a" << "b" ); for( int i = 0; i < 100000; ++i ) client_->insert( ns_, obj ); client_->ensureIndex( ns_, obj ); }
开发者ID:DjComandos,项目名称:mongo,代码行数:6,
示例11: GetMoreIndex GetMoreIndex() : ns_( testNs( this ) ) { for( int i = 0; i < 100000; ++i ) client_->insert( ns_.c_str(), BSON( "a" << i ) ); client_->ensureIndex( ns_, BSON( "a" << 1 ) ); c_ = client_->query( ns_.c_str(), QUERY( "a" << GT << -1 ).hint( BSON( "a" << 1 ) ) ); }
开发者ID:DjComandos,项目名称:mongo,代码行数:6,
示例12: GetMoreKeyMatchHelps GetMoreKeyMatchHelps() : ns_( testNs( this ) ) { for( int i = 0; i < 1000000; ++i ) client_->insert( ns_.c_str(), BSON( "a" << i << "b" << i % 10 << "c" << "d" ) ); client_->ensureIndex( ns_, BSON( "a" << 1 << "b" << 1 ) ); c_ = client_->query( ns_.c_str(), QUERY( "a" << GT << -1 << "b" << 0 ).hint( BSON( "a" << 1 << "b" << 1 ) ) ); }
开发者ID:DjComandos,项目名称:mongo,代码行数:6,
示例13: SortReverse SortReverse() : ns_( testNs( this ) ) { for( int i = 0; i < 50000; ++i ) client_->insert( ns_.c_str(), BSON( "_id" << ( 50000 - 1 - i ) ) ); }
开发者ID:DjComandos,项目名称:mongo,代码行数:4,
示例14: GetMore GetMore() : ns_( testNs( this ) ) { for( int i = 0; i < 100000; ++i ) client_->insert( ns_.c_str(), BSON( "a" << i ) ); c_ = client_->query( ns_.c_str(), Query() ); }
开发者ID:DjComandos,项目名称:mongo,代码行数:5,
示例15: Capped Capped() : ns_( testNs( this ) ) { client_->createCollection( ns_.c_str(), 100000, true ); }
开发者ID:DjComandos,项目名称:mongo,代码行数:3,
示例16: SortOrdered SortOrdered() : ns_( testNs( this ) ) { for( int i = 0; i < 50000; ++i ) client_->insert( ns_.c_str(), BSON( "_id" << i ) ); }
开发者ID:DjComandos,项目名称:mongo,代码行数:4,
示例17: TwoIndex TwoIndex() : ns_( testNs( this ) ) { client_->ensureIndex( ns_, BSON( "_id" << 1 ), "my_id" ); }
开发者ID:DjComandos,项目名称:mongo,代码行数:3,
示例18: OneIndexReverse OneIndexReverse() : ns_( testNs( this ) ) { client_->ensureIndex( ns_, BSON( "_id" << 1 ) ); }
开发者ID:DjComandos,项目名称:mongo,代码行数:3,
示例19: OneIndexHighLow OneIndexHighLow() : ns_( testNs( this ) ) { client_->ensureIndex( ns_, BSON( "_id" << 1 ) ); }
开发者ID:DjComandos,项目名称:mongo,代码行数:3,
示例20: Smaller Smaller() : ns_( testNs( this ) ) { for( int i = 0; i < 100000; ++i ) client_->insert( ns_.c_str(), BSON( "_id" << i << "b" << 2 ) ); }
开发者ID:DjComandos,项目名称:mongo,代码行数:4,
示例21: SetGrow SetGrow() : ns_( testNs( this ) ) { for( int i = 0; i < 10000; ++i ) client_->insert( ns_.c_str(), BSON( "_id" << i << "i" << "" ) ); }
开发者ID:DjComandos,项目名称:mongo,代码行数:4,
示例22: run void run() { string ns = testNs( this ); for( int i = 0; i < 100000; ++i ) { client_->insert( ns.c_str(), BSON( "_id" << i ) ); } }
开发者ID:DjComandos,项目名称:mongo,代码行数:6,
示例23: NoMatchIndex NoMatchIndex() : ns_( testNs( this ) ) { for( int i = 0; i < 100000; ++i ) client_->insert( ns_.c_str(), BSON( "_id" << i ) ); }
开发者ID:DjComandos,项目名称:mongo,代码行数:4,
注:本文中的testNs函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ testRuleOnCode函数代码示例 C++ testFinish函数代码示例 |