Skip to content

Commit 3579793

Browse files
authored
Add shorthand version of opensearch-benchmark invocation, osb (#745)
Signed-off-by: Ian Hoang <[email protected]>
1 parent 90a85b2 commit 3579793

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

it/__init__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
CONFIG_NAMES = ["in-memory-it", "os-it"]
4040
DISTRIBUTIONS = ["1.3.9", "2.5.0"]
4141
WORKLOADS = ["geonames", "nyc_taxis", "http_logs", "nested"]
42+
BASE_COMMANDS = ["opensearch-benchmark", "osb"]
4243
ROOT_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
4344

4445

@@ -79,7 +80,7 @@ def wrapper(cfg, *args, **kwargs):
7980

8081

8182
def osbenchmark_command_line_for(cfg, command_line):
82-
return f"opensearch-benchmark {command_line} --configuration-name='{cfg}'"
83+
return f"{random.choice(BASE_COMMANDS)} {command_line} --configuration-name='{cfg}'"
8384

8485

8586
def osbenchmark(cfg, command_line):

setup.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,9 @@ def str_from_file(name):
179179
entry_points={
180180
"console_scripts": [
181181
"opensearch-benchmark=osbenchmark.benchmark:main",
182-
"opensearch-benchmarkd=osbenchmark.benchmarkd:main"
182+
"opensearch-benchmarkd=osbenchmark.benchmarkd:main",
183+
"osb=osbenchmark.benchmark:main",
184+
"osbd=osbenchmark.benchmarkd:main",
183185
],
184186
},
185187
scripts=['scripts/expand-data-corpus.py', 'scripts/pbzip2' ],

0 commit comments

Comments
 (0)