add more options to many mappings test

This commit is contained in:
Shay Banon 2014-07-08 23:46:19 +02:00
parent c268e2d0ef
commit b97b670011
1 changed files with 6 additions and 2 deletions

View File

@ -82,22 +82,26 @@ public class ManyMappingsBenchmark {
private static final String TYPE_NAME = "type"; private static final String TYPE_NAME = "type";
private static final int FIELD_COUNT = 100000; private static final int FIELD_COUNT = 100000;
private static final int DOC_COUNT = 10000000; private static final int DOC_COUNT = 10000000;
private static final boolean TWO_NODES = false;
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
System.setProperty("es.logger.prefix", ""); System.setProperty("es.logger.prefix", "");
Natives.tryMlockall(); Natives.tryMlockall();
Settings settings = settingsBuilder() Settings settings = settingsBuilder()
.put("index.refresh_interval", "-1")
.put("gateway.type", "local") .put("gateway.type", "local")
.put(SETTING_NUMBER_OF_SHARDS, 5) .put(SETTING_NUMBER_OF_SHARDS, 5)
.put(SETTING_NUMBER_OF_REPLICAS, 0) .put(SETTING_NUMBER_OF_REPLICAS, 0)
.put(TransportModule.TRANSPORT_TYPE_KEY, "local")
.build(); .build();
String clusterName = ManyMappingsBenchmark.class.getSimpleName(); String clusterName = ManyMappingsBenchmark.class.getSimpleName();
Node node = nodeBuilder().clusterName(clusterName) Node node = nodeBuilder().clusterName(clusterName)
.settings(settingsBuilder().put(settings)) .settings(settingsBuilder().put(settings))
.node(); .node();
if (TWO_NODES) {
Node node2 = nodeBuilder().clusterName(clusterName)
.settings(settingsBuilder().put(settings))
.node();
}
Client client = node.client(); Client client = node.client();