[Rename] client/benchmark (#190)
This PR renames Elasticsearch to OpenSearch in the client/benchmark module. Signed-off-by: Rabi Panda <adnapibar@gmail.com>
This commit is contained in:
parent
40c21dce83
commit
595bddaac1
|
@ -1,8 +1,8 @@
|
|||
### Steps to execute the benchmark
|
||||
|
||||
1. Build `client-benchmark-noop-api-plugin` with `./gradlew :client:client-benchmark-noop-api-plugin:assemble`
|
||||
2. Install it on the target host with `bin/elasticsearch-plugin install file:///full/path/to/client-benchmark-noop-api-plugin.zip`.
|
||||
3. Start Elasticsearch on the target host (ideally *not* on the machine
|
||||
2. Install it on the target host with `bin/opensearch-plugin install file:///full/path/to/client-benchmark-noop-api-plugin.zip`.
|
||||
3. Start OpenSearch on the target host (ideally *not* on the machine
|
||||
that runs the benchmarks)
|
||||
4. Run the benchmark with
|
||||
```
|
||||
|
@ -21,7 +21,7 @@ In general, you should define a few GC-related settings `-Xms8192M -Xmx8192M -XX
|
|||
|
||||
#### Bulk indexing
|
||||
|
||||
Download benchmark data from http://benchmarks.elasticsearch.org.s3.amazonaws.com/corpora/geonames and decompress them.
|
||||
Download benchmark data from http://benchmarks.opensearch.org.s3.amazonaws.com/corpora/geonames and decompress them.
|
||||
|
||||
Example invocation:
|
||||
|
||||
|
@ -36,7 +36,7 @@ The parameters are all in the `'`s and are in order:
|
|||
|
||||
* Client type: Use either "rest" or "transport"
|
||||
* Benchmark type: Use either "bulk" or "search"
|
||||
* Benchmark target host IP (the host where Elasticsearch is running)
|
||||
* Benchmark target host IP (the host where OpenSearch is running)
|
||||
* full path to the file that should be bulk indexed
|
||||
* name of the index
|
||||
* name of the (sole) type in the index
|
||||
|
@ -56,7 +56,7 @@ The parameters are in order:
|
|||
|
||||
* Client type: Use either "rest" or "transport"
|
||||
* Benchmark type: Use either "bulk" or "search"
|
||||
* Benchmark target host IP (the host where Elasticsearch is running)
|
||||
* Benchmark target host IP (the host where OpenSearch is running)
|
||||
* name of the index
|
||||
* a search request body (remember to escape double quotes). The `TransportClientBenchmark` uses `QueryBuilders.wrapperQuery()` internally which automatically adds a root key `query`, so it must not be present in the command line parameter.
|
||||
* A comma-separated list of target throughput rates
|
||||
|
|
|
@ -17,16 +17,16 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
apply plugin: 'elasticsearch.build'
|
||||
apply plugin: 'opensearch.build'
|
||||
apply plugin: 'application'
|
||||
|
||||
group = 'org.elasticsearch.client'
|
||||
group = 'org.opensearch.client'
|
||||
|
||||
// Not published so no need to assemble
|
||||
assemble.enabled = true
|
||||
|
||||
archivesBaseName = 'client-benchmarks'
|
||||
mainClassName = 'org.elasticsearch.client.benchmark.BenchmarkMain'
|
||||
mainClassName = 'org.opensearch.client.benchmark.BenchmarkMain'
|
||||
|
||||
// never try to invoke tests on the benchmark project - there aren't any
|
||||
test.enabled = false
|
||||
|
@ -35,7 +35,7 @@ dependencies {
|
|||
api 'org.apache.commons:commons-math3:3.2'
|
||||
|
||||
api project(":client:rest")
|
||||
// bottleneck should be the client, not Elasticsearch
|
||||
// bottleneck should be the client, not OpenSearch
|
||||
api project(path: ':client:client-benchmark-noop-api-plugin')
|
||||
// for transport client
|
||||
api project(":server")
|
||||
|
|
|
@ -16,12 +16,12 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.client.benchmark;
|
||||
package org.opensearch.client.benchmark;
|
||||
|
||||
import org.elasticsearch.client.benchmark.ops.bulk.BulkBenchmarkTask;
|
||||
import org.elasticsearch.client.benchmark.ops.bulk.BulkRequestExecutor;
|
||||
import org.elasticsearch.client.benchmark.ops.search.SearchBenchmarkTask;
|
||||
import org.elasticsearch.client.benchmark.ops.search.SearchRequestExecutor;
|
||||
import org.opensearch.client.benchmark.ops.bulk.BulkBenchmarkTask;
|
||||
import org.opensearch.client.benchmark.ops.bulk.BulkRequestExecutor;
|
||||
import org.opensearch.client.benchmark.ops.search.SearchBenchmarkTask;
|
||||
import org.opensearch.client.benchmark.ops.search.SearchRequestExecutor;
|
||||
import org.elasticsearch.common.SuppressForbidden;
|
||||
|
||||
import java.io.Closeable;
|
|
@ -16,10 +16,10 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.client.benchmark;
|
||||
package org.opensearch.client.benchmark;
|
||||
|
||||
import org.elasticsearch.client.benchmark.rest.RestClientBenchmark;
|
||||
import org.elasticsearch.client.benchmark.transport.TransportClientBenchmark;
|
||||
import org.opensearch.client.benchmark.rest.RestClientBenchmark;
|
||||
import org.opensearch.client.benchmark.transport.TransportClientBenchmark;
|
||||
import org.elasticsearch.common.SuppressForbidden;
|
||||
|
||||
import java.util.Arrays;
|
|
@ -16,12 +16,12 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.client.benchmark;
|
||||
package org.opensearch.client.benchmark;
|
||||
|
||||
import org.elasticsearch.client.benchmark.metrics.Metrics;
|
||||
import org.elasticsearch.client.benchmark.metrics.MetricsCalculator;
|
||||
import org.elasticsearch.client.benchmark.metrics.Sample;
|
||||
import org.elasticsearch.client.benchmark.metrics.SampleRecorder;
|
||||
import org.opensearch.client.benchmark.metrics.Metrics;
|
||||
import org.opensearch.client.benchmark.metrics.MetricsCalculator;
|
||||
import org.opensearch.client.benchmark.metrics.Sample;
|
||||
import org.opensearch.client.benchmark.metrics.SampleRecorder;
|
||||
import org.elasticsearch.common.SuppressForbidden;
|
||||
|
||||
import java.util.Arrays;
|
|
@ -16,9 +16,9 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.client.benchmark;
|
||||
package org.opensearch.client.benchmark;
|
||||
|
||||
import org.elasticsearch.client.benchmark.metrics.SampleRecorder;
|
||||
import org.opensearch.client.benchmark.metrics.SampleRecorder;
|
||||
|
||||
public interface BenchmarkTask {
|
||||
void setUp(SampleRecorder sampleRecorder) throws Exception;
|
|
@ -16,7 +16,7 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.client.benchmark.metrics;
|
||||
package org.opensearch.client.benchmark.metrics;
|
||||
|
||||
public final class Metrics {
|
||||
public final String operation;
|
|
@ -16,7 +16,7 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.client.benchmark.metrics;
|
||||
package org.opensearch.client.benchmark.metrics;
|
||||
|
||||
import org.apache.commons.math3.stat.StatUtils;
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.client.benchmark.metrics;
|
||||
package org.opensearch.client.benchmark.metrics;
|
||||
|
||||
public final class Sample {
|
||||
private final String operation;
|
|
@ -16,7 +16,7 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.client.benchmark.metrics;
|
||||
package org.opensearch.client.benchmark.metrics;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
|
@ -16,14 +16,14 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.client.benchmark.ops.bulk;
|
||||
package org.opensearch.client.benchmark.ops.bulk;
|
||||
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.elasticsearch.OpenSearchException;
|
||||
import org.elasticsearch.client.benchmark.BenchmarkTask;
|
||||
import org.elasticsearch.client.benchmark.metrics.Sample;
|
||||
import org.elasticsearch.client.benchmark.metrics.SampleRecorder;
|
||||
import org.opensearch.client.benchmark.BenchmarkTask;
|
||||
import org.opensearch.client.benchmark.metrics.Sample;
|
||||
import org.opensearch.client.benchmark.metrics.SampleRecorder;
|
||||
import org.elasticsearch.common.SuppressForbidden;
|
||||
import org.elasticsearch.common.io.PathUtils;
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.client.benchmark.ops.bulk;
|
||||
package org.opensearch.client.benchmark.ops.bulk;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -16,11 +16,11 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.client.benchmark.ops.search;
|
||||
package org.opensearch.client.benchmark.ops.search;
|
||||
|
||||
import org.elasticsearch.client.benchmark.BenchmarkTask;
|
||||
import org.elasticsearch.client.benchmark.metrics.Sample;
|
||||
import org.elasticsearch.client.benchmark.metrics.SampleRecorder;
|
||||
import org.opensearch.client.benchmark.BenchmarkTask;
|
||||
import org.opensearch.client.benchmark.metrics.Sample;
|
||||
import org.opensearch.client.benchmark.metrics.SampleRecorder;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.client.benchmark.ops.search;
|
||||
package org.opensearch.client.benchmark.ops.search;
|
||||
|
||||
public interface SearchRequestExecutor {
|
||||
boolean search(String source);
|
|
@ -16,7 +16,7 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.client.benchmark.rest;
|
||||
package org.opensearch.client.benchmark.rest;
|
||||
|
||||
import org.apache.http.HttpHeaders;
|
||||
import org.apache.http.HttpHost;
|
||||
|
@ -26,9 +26,9 @@ import org.elasticsearch.OpenSearchException;
|
|||
import org.elasticsearch.client.Request;
|
||||
import org.elasticsearch.client.Response;
|
||||
import org.elasticsearch.client.RestClient;
|
||||
import org.elasticsearch.client.benchmark.AbstractBenchmark;
|
||||
import org.elasticsearch.client.benchmark.ops.bulk.BulkRequestExecutor;
|
||||
import org.elasticsearch.client.benchmark.ops.search.SearchRequestExecutor;
|
||||
import org.opensearch.client.benchmark.AbstractBenchmark;
|
||||
import org.opensearch.client.benchmark.ops.bulk.BulkRequestExecutor;
|
||||
import org.opensearch.client.benchmark.ops.search.SearchRequestExecutor;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Collections;
|
|
@ -16,7 +16,7 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.client.benchmark.transport;
|
||||
package org.opensearch.client.benchmark.transport;
|
||||
|
||||
import org.elasticsearch.OpenSearchException;
|
||||
import org.elasticsearch.action.bulk.BulkRequest;
|
||||
|
@ -24,9 +24,9 @@ import org.elasticsearch.action.bulk.BulkResponse;
|
|||
import org.elasticsearch.action.index.IndexRequest;
|
||||
import org.elasticsearch.action.search.SearchRequest;
|
||||
import org.elasticsearch.action.search.SearchResponse;
|
||||
import org.elasticsearch.client.benchmark.AbstractBenchmark;
|
||||
import org.elasticsearch.client.benchmark.ops.bulk.BulkRequestExecutor;
|
||||
import org.elasticsearch.client.benchmark.ops.search.SearchRequestExecutor;
|
||||
import org.opensearch.client.benchmark.AbstractBenchmark;
|
||||
import org.opensearch.client.benchmark.ops.bulk.BulkRequestExecutor;
|
||||
import org.opensearch.client.benchmark.ops.search.SearchRequestExecutor;
|
||||
import org.elasticsearch.client.transport.TransportClient;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.transport.TransportAddress;
|
Loading…
Reference in New Issue