Search in sources :

Example 1 with RestClientBenchmark

use of org.elasticsearch.client.benchmark.rest.RestClientBenchmark in project elasticsearch by elastic.

the class BenchmarkMain method main.

@SuppressForbidden(reason = "system out is ok for a command line tool")
public static void main(String[] args) throws Exception {
    String type = args[0];
    AbstractBenchmark<?> benchmark = null;
    switch(type) {
        case "transport":
            benchmark = new TransportClientBenchmark();
            break;
        case "rest":
            benchmark = new RestClientBenchmark();
            break;
        default:
            System.err.println("Unknown client type [" + type + "]");
            System.exit(1);
    }
    benchmark.run(Arrays.copyOfRange(args, 1, args.length));
}
Also used : TransportClientBenchmark(org.elasticsearch.client.benchmark.transport.TransportClientBenchmark) RestClientBenchmark(org.elasticsearch.client.benchmark.rest.RestClientBenchmark) SuppressForbidden(org.elasticsearch.common.SuppressForbidden)

Aggregations

RestClientBenchmark (org.elasticsearch.client.benchmark.rest.RestClientBenchmark)1 TransportClientBenchmark (org.elasticsearch.client.benchmark.transport.TransportClientBenchmark)1 SuppressForbidden (org.elasticsearch.common.SuppressForbidden)1