Skip to content

Commit

Permalink
change artifact name to opensearch-benchmark (#82)
Browse files Browse the repository at this point in the history
* change artifact name to opensearch-benchmark

Signed-off-by: Achit Ojha <achiojha@amazon.com>

* associated changes

Signed-off-by: Achit Ojha <achiojha@amazon.com>

Co-authored-by: Achit Ojha <achiojha@amazon.com>
  • Loading branch information
achitojha and Achit Ojha authored Dec 7, 2021
1 parent 8839e1e commit 907c644
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function build_it {
# ensure pyenv shims are added to PATH, see https://github.com/pyenv/pyenv/issues/1906
eval "$(pyenv init --path)"
eval "$(pyenv virtualenv-init -)"
pip install osbenchmark
pip install opensearch-benchmark

make prereq
make install
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Installing Benchmark

Install Python 3.8+ including ``pip3``, git 1.9+ and an [appropriate JDK to run OpenSearch](<https://github.com/opensearch-project/OpenSearch-Benchmark/blob/main/DEVELOPER_GUIDE.md>) Be sure that ``JAVA_HOME`` points to that JDK. Then run the following command, optionally prefixed by ``sudo`` if necessary:

pip3 install osbenchmark
pip3 install opensearch-benchmark


If you have any trouble or need more detailed instructions, please look in the [detailed installation guide](<https://github.com/opensearch-project/OpenSearch-Benchmark/blob/main/DEVELOPER_GUIDE.md>`).
Expand All @@ -38,7 +38,7 @@ Run your first test execution

Now we're ready to run our first test execution:

osbenchmark execute_test --distribution-version=1.0.0 --workload=geonames --test-mode
opensearch-benchmark execute_test --distribution-version=1.0.0 --workload=geonames --test-mode

This will download OpenSearch 1.0.0 and run Benchmark's default workload - the [geonames workload](<https://github.com/opensearch-project/opensearch-benchmark-workloads/tree/main/geonames>) - against it.
Note that this uses the `--test-mode` argument to only run a single instance of each operation in order to reduce the time needed for a test execution. This argument is used as a sanity check and should be removed in an actual benchmarking scenario.
Expand Down Expand Up @@ -106,7 +106,7 @@ After the test execution, a summary report is written to the command line:
Getting help
------------

* Quick help: ``osbenchmark --help``
* Quick help: ``opensearch-benchmark --help``
* Look in [Benchmark's user guide](<https://github.com/opensearch-project/OpenSearch-Benchmark/blob/main/DEVELOPER_GUIDE.md>) for more information
* For any questions or answers, visit our [community forum](<https://discuss.opendistrocommunity.dev/>).
* File improvements or bug reports in our [Github repo](<https://github.com/opensearch-project/OpenSearch-Benchmark/issues>).
Expand Down
4 changes: 2 additions & 2 deletions docker/bin/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ set -Eeo pipefail

if [[ $1 == *"bash"* || $1 == *"sh"* ]]; then
: # noop
elif [[ $1 != "osbenchmark" ]]; then
set -- osbenchmark "$@"
elif [[ $1 != "opensearch-benchmark" ]]; then
set -- opensearch-benchmark "$@"
fi

exec "$@"
4 changes: 2 additions & 2 deletions it/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def wrapper(cfg, *args, **kwargs):


def osbenchmark_command_line_for(cfg, command_line):
return f"osbenchmark {command_line} --configuration-name='{cfg}'"
return f"opensearch-benchmark {command_line} --configuration-name='{cfg}'"


def osbenchmark(cfg, command_line):
Expand Down Expand Up @@ -164,7 +164,7 @@ def install(self, distribution_version, node_name, provision_config_instance, ht
transport_port = http_port + 100
try:
output = process.run_subprocess_with_output(
"osbenchmark install --configuration-name={cfg} --quiet --distribution-version={dist} --build-type=tar "
"opensearch-benchmark install --configuration-name={cfg} --quiet --distribution-version={dist} --build-type=tar "
"--http-port={http_port} --node={node_name} --master-nodes="
"{node_name} --provision-config-instance={provision_config_instance} "
"--seed-hosts=\"127.0.0.1:{transport_port}\"".format(cfg=self.cfg,
Expand Down
2 changes: 1 addition & 1 deletion osbenchmark/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

import pkg_resources

__version__ = pkg_resources.require("osbenchmark")[0].version
__version__ = pkg_resources.require("opensearch-benchmark")[0].version

# Allow an alternative program name be set in case Benchmark is invoked a wrapper script
PROGRAM_NAME = os.getenv("BENCHMARK_ALTERNATIVE_BINARY_NAME", os.path.basename(sys.argv[0]))
Expand Down
2 changes: 1 addition & 1 deletion osbenchmark/utils/net.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def _download_from_s3_bucket(bucket_name, bucket_path, local_path, expected_size
_fake_import_boto3()
import boto3.s3.transfer
except ImportError:
console.error("S3 support is optional. Install it with `python -m pip install osbenchmark[s3]`")
console.error("S3 support is optional. Install it with `python -m pip install opensearch-benchmark[s3]`")
raise


Expand Down
2 changes: 1 addition & 1 deletion osbenchmark/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
from osbenchmark import paths
from osbenchmark.utils import git, io

__version__ = pkg_resources.require("osbenchmark")[0].version
__version__ = pkg_resources.require("opensearch-benchmark")[0].version

__BENCHMARK_VERSION_PATTERN = re.compile(r"^(\d+)(?:\.(\d+))?(?:\.(\d+))?(?:.(.+))?$")

Expand Down
7 changes: 3 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,7 @@ def str_from_file(name):
# next minor after the latest supported version
first_unsupported_version = "{}.{}".format(supported_python_versions[-1][0], supported_python_versions[-1][1] + 1)

# we call the tool benchmark, but it will be published as osbenchmark on pypi
setup(name="osbenchmark",
setup(name="opensearch-benchmark",
maintainer="Ian Hoang, Achit Ojha, Travis Benedict, Chase Engelbrecht, Govind Kamat, Phill Treddenick",
maintainer_email="hoangia@amazon.com, achiojha@amazon.com, benedtra@amazon.com, engechas@amazon.com, govkamat@amazon.com, treddeni@amazon.com",
version=__versionstr__,
Expand Down Expand Up @@ -163,8 +162,8 @@ def str_from_file(name):
},
entry_points={
"console_scripts": [
"osbenchmark=osbenchmark.benchmark:main",
"osbenchmarkd=osbenchmark.benchmarkd:main"
"opensearch-benchmark=osbenchmark.benchmark:main",
"opensearch-benchmarkd=osbenchmark.benchmarkd:main"
],
},
classifiers=[
Expand Down
2 changes: 1 addition & 1 deletion tests/utils/net_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def test_missing_boto3(self, import_boto3, console_error):
with pytest.raises(ImportError, match="no module named 'boto3'"):
net.download_from_bucket("s3", "s3://mybucket/data", "/tmp/data", None, None)
console_error.assert_called_once_with(
"S3 support is optional. Install it with `python -m pip install osbenchmark[s3]`"
"S3 support is optional. Install it with `python -m pip install opensearch-benchmark[s3]`"
)

@pytest.mark.parametrize("seed", range(1))
Expand Down

0 comments on commit 907c644

Please sign in to comment.