Skip to content

Commit

Permalink
[Rename] client/benchmark (#190)
Browse files Browse the repository at this point in the history
This PR renames Elasticsearch to OpenSearch in the client/benchmark module.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
  • Loading branch information
adnapibar authored and nknize committed Mar 22, 2021
1 parent 40c21dc commit 595bdda
Show file tree
Hide file tree
Showing 16 changed files with 46 additions and 46 deletions.
10 changes: 5 additions & 5 deletions client/benchmark/README.md
Original file line number Diff line number Diff line change
@@ -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
```
Expand All @@ -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:

Expand All @@ -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
Expand All @@ -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
8 changes: 4 additions & 4 deletions client/benchmark/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -26,9 +26,9 @@
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@
* 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;
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;
Expand Down

0 comments on commit 595bdda

Please sign in to comment.