各位小伙伴,今天我们来用java压一下单节点,同机器的mongo。
2.7 GHz Intel Core i5
8 GB 1867 MHz DDR3
核总数:2
import com.mongodb.MongoClient; import com.mongodb.client.MongoCollection; import com.mongodb.client.MongoDatabase; import org.bson.Document; /** * Created by tarner on 17/9/19. */ public class Application { public static void main(String[] args) throws Exception { MongoClient mongoClient = new MongoClient("127.0.0.1"); MongoDatabase test