Skip to content

Commit 096a178

Browse files
IanHoanggkamat
authored andcommitted
Address Integration Tests
Signed-off-by: Ian Hoang <[email protected]>
1 parent ef0ddaf commit 096a178

File tree

8 files changed

+13
-13
lines changed

8 files changed

+13
-13
lines changed

CREATE_WORKLOAD_GUIDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ By default, workloads created will come with the following operations run in the
5353

5454
To invoke the newly created workload, run the following:
5555
```
56-
$ opensearch-benchmark run-test \
56+
$ opensearch-benchmark run \
5757
--pipeline="benchmark-only" \
5858
--workload-path="<PATH OUTPUTTED IN THE OUTPUT OF THE CREATE-WORKLOAD COMMAND>" \
5959
--target-host="<CLUSTER ENDPOINT>" \

DEVELOPER_GUIDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ Now, you have a local cluster running! You can connect to this and run the workl
152152
153153
Here's a sample run of the geonames benchmark which can be found from the [workloads](https://github.com/opensearch-project/opensearch-benchmark-workloads) repo.
154154
```
155-
opensearch-benchmark run-test --pipeline=benchmark-only --workload=geonames --target-host=127.0.0.1:9200 --test-mode --workload-params '{"number_of_shards":"1","number_of_replicas":"0"}'
155+
opensearch-benchmark run --pipeline=benchmark-only --workload=geonames --target-host=127.0.0.1:9200 --test-mode --workload-params '{"number_of_shards":"1","number_of_replicas":"0"}'
156156
```
157157
158158
And we're done! You should be seeing the performance metrics soon enough!

PYTHON_SUPPORT_GUIDE.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,17 @@ supported_python_versions = [(3, 8), (3, 9), (3, 10), (3, 11), (3, 12)]
2727

2828
**Basic OpenSearch Benchmark command with distribution version and test mode**
2929
```
30-
opensearch-benchmark run-test --distribution-version=1.0.0 --workload=geonames --test-mode
30+
opensearch-benchmark run --distribution-version=1.0.0 --workload=geonames --test-mode
3131
```
3232

3333
**OpenSearch Benchmark command running test on target-host in test mode**
3434
```
35-
opensearch-benchmark run-test --workload=geonames --pipeline=benchmark-only --target-host="<OPENSEARCH CLUSTER ENDPOINT>" --client-options="basic_auth_user:'<USERNAME>',basic_auth_password:'<PASSWORD>'" --test-mode"
35+
opensearch-benchmark run --workload=geonames --pipeline=benchmark-only --target-host="<OPENSEARCH CLUSTER ENDPOINT>" --client-options="basic_auth_user:'<USERNAME>',basic_auth_password:'<PASSWORD>'" --test-mode"
3636
```
3737

3838
**OpenSearch-Benchmark command running test on target-host without test mode**
3939
```
40-
opensearch-benchmark run-test --workload=geonames --pipeline=benchmark-only --target-host="<OPENSEARCH CLUSTER ENDPOINT>" --client-options="basic_auth_user:'<USERNAME>',basic_auth_password:'<PASSWORD>'"
40+
opensearch-benchmark run --workload=geonames --pipeline=benchmark-only --target-host="<OPENSEARCH CLUSTER ENDPOINT>" --client-options="basic_auth_user:'<USERNAME>',basic_auth_password:'<PASSWORD>'"
4141
```
4242

4343
To ensure that users are using the correct python versions, install the repository with `python3 -m pip install -e .` and run `which opensearch-benchmark` to get the path. Pre-append this path to each of the three commands above and re-run them in the command line.
@@ -46,12 +46,12 @@ Keep in mind the file path outputted differs for each operating system and might
4646

4747
- For example: When running `which opensearch-benchmark` on an Ubuntu environment, the commad line outputs `/home/ubuntu/.pyenv/shims/opensearch-benchmark`. On closer inspection, the path points to a shell script. Thus, to invoke OpenSearch Benchmark, pre-=append the OpenSearch Benchmark command with `bash` and the path outputted earlier:
4848
```
49-
bash -x /home/ubuntu/.pyenv/shims/opensearch-benchmark run-test --workload=geonames --pipeline=benchmark-only --target-host="<OPENSEARCH CLUSTER ENDPOINT>" --client-options="basic_auth_user:'<USERNAME>',basic_auth_password:'<PASSWORD>'"
49+
bash -x /home/ubuntu/.pyenv/shims/opensearch-benchmark run --workload=geonames --pipeline=benchmark-only --target-host="<OPENSEARCH CLUSTER ENDPOINT>" --client-options="basic_auth_user:'<USERNAME>',basic_auth_password:'<PASSWORD>'"
5050
```
5151

5252
- Another example: When running `which opensearch-benchmark` on an Amazon Linux 2 environment, the command line outputs `~/.local/bin/opensearch-benchmark`. On closer inspection, the path points to a Python script. Thus, to invoke OpenSearch Benchmark, pre-append the OpenSearch Benchmark command with `python3` and the path outputted earlier:
5353
```
54-
python3 ~/.local/bin/opensearch-benchmark run-test --workload=geonames --pipeline=benchmark-only --target-host="<OPENSEARCH CLUSTER ENDPOINT>" --client-options="basic_auth_user:'<USERNAME>',basic_auth_password:'<PASSWORD>'"
54+
python3 ~/.local/bin/opensearch-benchmark run --workload=geonames --pipeline=benchmark-only --target-host="<OPENSEARCH CLUSTER ENDPOINT>" --client-options="basic_auth_user:'<USERNAME>',basic_auth_password:'<PASSWORD>'"
5555
```
5656

5757
### Creating a Pull Request After Adding Changes and Testing Them Out

it/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def run_test(cfg, command_line):
101101
This method should be used for benchmark invocations of the test_run command.
102102
It sets up some defaults for how the integration tests expect to run test_runs.
103103
"""
104-
return osbenchmark(cfg, f"run-test {command_line} --kill-running-processes --on-error='abort'")
104+
return osbenchmark(cfg, f"run {command_line} --kill-running-processes --on-error='abort'")
105105

106106

107107
def shell_cmd(command_line):

osbenchmark/benchmark.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,9 +1093,9 @@ def prepare_test_runs_dict(args, cfg):
10931093
return test_runs_dict
10941094

10951095
def configure_test(arg_parser, args, cfg):
1096-
# As the run-test command is doing more work than necessary at the moment, we duplicate several parameters
1096+
# As the run command is doing more work than necessary at the moment, we duplicate several parameters
10971097
# in this section that actually belong to dedicated subcommands (like install, start or stop). Over time
1098-
# these duplicated parameters will vanish as we move towards dedicated subcommands and use "run-test" only
1098+
# these duplicated parameters will vanish as we move towards dedicated subcommands and use "run" only
10991099
# to run the actual benchmark (i.e. generating load).
11001100
print_test_run_id(args)
11011101
if args.effective_start_date:

osbenchmark/workload_generator/workload_generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,4 @@ def create_workload(cfg):
9595
custom_workload_writer.render_templates(template_vars, custom_workload.queries)
9696

9797
console.println("")
98-
console.info(f"Workload {workload_name} has been created. Run it with: {PROGRAM_NAME} run-test --workload-path={custom_workload.workload_path}")
98+
console.info(f"Workload {workload_name} has been created. Run it with: {PROGRAM_NAME} run --workload-path={custom_workload.workload_path}")

samples/ccr/start.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,4 +147,4 @@ EOF
147147

148148

149149
# Start OpenSearch Benchmark
150-
opensearch-benchmark run-test --configuration-name=metricstore --workload=geonames --target-hosts=./ccr-target-hosts.json --pipeline=benchmark-only --workload-params="number_of_replicas:1" --client-options=./ccr-client-options.json --kill-running-processes --telemetry="ccr-stats" --telemetry-params=./ccr-telemetry-param.json
150+
opensearch-benchmark run --configuration-name=metricstore --workload=geonames --target-hosts=./ccr-target-hosts.json --pipeline=benchmark-only --workload-params="number_of_replicas:1" --client-options=./ccr-client-options.json --kill-running-processes --telemetry="ccr-stats" --telemetry-params=./ccr-telemetry-param.json

scripts/expand-data-corpus.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
2828
$ expand-data-corpus.py --corpus-size 100 --output-file-suffix 100gb
2929
30-
$ opensearch-benchmark run-test --workload http_logs \\
30+
$ opensearch-benchmark run --workload http_logs \\
3131
--workload_params=generated_corpus:t ...
3232
3333
The script generates new documents by duplicating ones in the existing

0 commit comments

Comments
 (0)