标签:blog point stat log roo exec dmi default primary
一、逐条写入性能测试脚本
[root@wlan-cloudserver8 bin]# ./mongo 172.27.8.118:40000
SHARDING_2:PRIMARY> use admin
switched to db admin
SHARDING_2:PRIMARY> db.auth(‘wlan‘,‘wlan‘)
SHARDING_2:PRIMARY> use estestdbnew
switched to db estestdbnew
SHARDING_2:PRIMARY> for(var i=0;i<1000;i++){db.estestdbnew.insert({name:"new", age:999})}
一、批量写入性能测试脚本
var bulk = db.test.initializeUnorderedBulkOp();
for(var i=0;i<100000;i++){bulk.insert( { item: "abc123", defaultQty: 100, status: "A", points: 100 } )} ---写入十万条
bulk.execute();
标签:blog point stat log roo exec dmi default primary
原文地址:http://www.cnblogs.com/zhengchunhao/p/6088439.html