custom nodes count

This commit is contained in:
Shay Banon 2011-09-07 20:38:48 +03:00
parent 189d117dcb
commit bcd4ef2823
1 changed files with 9 additions and 6 deletions

View File

@ -51,7 +51,7 @@ import static org.elasticsearch.search.facet.FacetBuilders.*;
*/ */
public class TermsFacetSearchBenchmark { public class TermsFacetSearchBenchmark {
static long COUNT = SizeValue.parseSizeValue("1m").singles(); static long COUNT = SizeValue.parseSizeValue("2m").singles();
static int BATCH = 100; static int BATCH = 100;
static int QUERY_WARMUP = 20; static int QUERY_WARMUP = 20;
static int QUERY_COUNT = 200; static int QUERY_COUNT = 200;
@ -65,12 +65,14 @@ public class TermsFacetSearchBenchmark {
Settings settings = settingsBuilder() Settings settings = settingsBuilder()
.put("index.refresh_interval", "-1") .put("index.refresh_interval", "-1")
.put("gateway.type", "local") .put("gateway.type", "local")
.put(SETTING_NUMBER_OF_SHARDS, 2) .put(SETTING_NUMBER_OF_SHARDS, 1)
.put(SETTING_NUMBER_OF_REPLICAS, 0) .put(SETTING_NUMBER_OF_REPLICAS, 0)
.build(); .build();
Node node1 = nodeBuilder().settings(settingsBuilder().put(settings).put("name", "node1")).node(); Node[] nodes = new Node[1];
Node node2 = nodeBuilder().settings(settingsBuilder().put(settings).put("name", "node2")).node(); for (int i = 0; i < nodes.length; i++) {
nodes[i] = nodeBuilder().settings(settingsBuilder().put(settings).put("name", "node" + i)).node();
}
Node clientNode = nodeBuilder().settings(settingsBuilder().put(settings).put("name", "client")).client(true).node(); Node clientNode = nodeBuilder().settings(settingsBuilder().put(settings).put("name", "client")).client(true).node();
@ -167,8 +169,9 @@ public class TermsFacetSearchBenchmark {
clientNode.close(); clientNode.close();
node1.close(); for (Node node : nodes) {
node2.close(); node.close();
}
} }
static class StatsResult { static class StatsResult {