diff --git a/.circleci/README.md b/.circleci/README.md index d37c13a27..1bc078157 100644 --- a/.circleci/README.md +++ b/.circleci/README.md @@ -16,6 +16,7 @@ Following _jobs_ are executed under each workflow - 3. **python-tests** : Executes pytests from _mms/tests/unit_tests/_ 4. **benchmark** : Executes latency benchmark using resnet-18 model 5. (NEW!) **api-tests** : Executes newman test suite for API testing +6. (NEW!) **performance-regression** : Executes performance regression suite Following _executors_ are available for job execution - 1. py27 diff --git a/.circleci/config.yml b/.circleci/config.yml index c8022a037..76aa16fb6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -40,12 +40,7 @@ commands: - run: name: Start MMS, Execute << parameters.collection >> API Tests, Stop MMS command: .circleci/scripts/linux_test_api.sh << parameters.collection >> - - store_artifacts: - name: Store server logs from << parameters.collection >> API tests - path: mms_<< parameters.collection >>.log - - store_artifacts: - name: Store << parameters.collection >> API test results - path: test/<< parameters.collection >>-api-report.html + when: always jobs: @@ -57,7 +52,7 @@ jobs: steps: - checkout - run: - name: Build frontend + name: Build MMS command: .circleci/scripts/linux_build.sh - store_artifacts: name: Store gradle testng results @@ -75,11 +70,12 @@ jobs: steps: - attach-mms-workspace - run: - name: Execute python unit tests + name: Execute python lint and unit tests command: .circleci/scripts/linux_test_python.sh - store_artifacts: name: Store python Test results - path: htmlcov + path: result_units + destination: units api-tests: parameters: @@ -95,6 +91,9 @@ jobs: collection: inference - exeucute-api-tests: collection: https + - store_artifacts: + name: Store server logs and test results + path: tests/api/artifacts/ benchmark: parameters: @@ -109,11 +108,31 @@ jobs: command: .circleci/scripts/linux_test_benchmark.sh - store_artifacts: name: Store server logs from benchmark tests - path: mms.log + path: logs/ - store_artifacts: name: Store Benchmark Latency resnet-18 results - path: /tmp/MMSBenchmark/out/latency/resnet-18/report/ - destination: benchmark-latency-resnet-18 + path: /tmp/MMSBenchmark + + performance-regression: + parameters: + executor: + type: executor + executor: << parameters.executor >> + steps: + - attach-mms-workspace + - install-mms-server + - run: + name: Start MMS, Execute performance regression testcases, Stop MMS + command: .circleci/scripts/linux_test_perf_regression.sh + - store_artifacts: + name: Store server logs + path: tests/performance/logs/ + - store_artifacts: + name: Store artifacts from performance regression run + path: tests/performance/run_artifacts/ + - store_test_results: + name: Store performance regression test results for CircleCI + path: tests/performance/run_artifacts/report/ modelarchiver: parameters: @@ -123,11 +142,11 @@ jobs: steps: - checkout - run: - name: Execute lint, unit and integration tests + name: Execute python lint, unit and integration tests command: .circleci/scripts/linux_test_modelarchiver.sh - store_artifacts: name: Store unit tests results from model archiver tests - path: model-archiver/results_units + path: model-archiver/result_units destination: units @@ -187,3 +206,8 @@ workflows: requires: - build-<< matrix.executor >> matrix: *matrix + - performance-regression: + name: performance-regression-<< matrix.executor >> + requires: + - build-<< matrix.executor >> + matrix: *matrix diff --git a/.circleci/scripts/linux_test_api.sh b/.circleci/scripts/linux_test_api.sh index 23f908abb..d8d128a02 100755 --- a/.circleci/scripts/linux_test_api.sh +++ b/.circleci/scripts/linux_test_api.sh @@ -1,21 +1,23 @@ #!/bin/bash -MODEL_STORE_DIR='test/model_store' +BASE_DIR="tests/api" +MODEL_STORE_DIR="model_store" -MMS_LOG_FILE_MANAGEMENT='mms_management.log' -MMS_LOG_FILE_INFERENCE='mms_inference.log' -MMS_LOG_FILE_HTTPS='mms_https.log' -MMS_CONFIG_FILE_HTTPS='test/resources/config.properties' +ARTIFACTS_BASE_DIR="artifacts" +ARTIFACTS_MANAGEMENT_DIR="$ARTIFACTS_BASE_DIR/management" +ARTIFACTS_INFERENCE_DIR="$ARTIFACTS_BASE_DIR/inference" +ARTIFACTS_HTTPS_DIR="$ARTIFACTS_BASE_DIR/https" -POSTMAN_ENV_FILE='test/postman/environment.json' -POSTMAN_COLLECTION_MANAGEMENT='test/postman/management_api_test_collection.json' -POSTMAN_COLLECTION_INFERENCE='test/postman/inference_api_test_collection.json' -POSTMAN_COLLECTION_HTTPS='test/postman/https_test_collection.json' -POSTMAN_DATA_FILE_INFERENCE='test/postman/inference_data.json' +MMS_CONSOLE_LOG_FILE="mms_console.log" +MMS_CONFIG_FILE_HTTPS="resources/config.properties" -REPORT_FILE_MANAGEMENT='test/management-api-report.html' -REPORT_FILE_INFERENCE='test/inference-api-report.html' -REPORT_FILE_HTTPS='test/https-api-report.html' +POSTMAN_ENV_FILE="postman/environment.json" +POSTMAN_COLLECTION_MANAGEMENT="postman/management_api_test_collection.json" +POSTMAN_COLLECTION_INFERENCE="postman/inference_api_test_collection.json" +POSTMAN_COLLECTION_HTTPS="postman/https_test_collection.json" +POSTMAN_DATA_FILE_INFERENCE="postman/inference_data.json" + +REPORT_FILE="report.html" start_mms_server() { multi-model-server --start --model-store $1 >> $2 2>&1 @@ -29,45 +31,78 @@ start_mms_secure_server() { stop_mms_server() { multi-model-server --stop + sleep 10 +} + +cleanup_model_store(){ + rm -rf $MODEL_STORE_DIR/* +} + +move_logs(){ + mv $1 logs/ + mv logs/ $2 } trigger_management_tests(){ - start_mms_server $MODEL_STORE_DIR $MMS_LOG_FILE_MANAGEMENT + start_mms_server $MODEL_STORE_DIR $MMS_CONSOLE_LOG_FILE newman run -e $POSTMAN_ENV_FILE $POSTMAN_COLLECTION_MANAGEMENT \ - -r cli,html --reporter-html-export $REPORT_FILE_MANAGEMENT --verbose + -r cli,html --reporter-html-export $ARTIFACTS_MANAGEMENT_DIR/$REPORT_FILE --verbose + local EXIT_CODE=$? stop_mms_server + move_logs $MMS_CONSOLE_LOG_FILE $ARTIFACTS_MANAGEMENT_DIR + cleanup_model_store + return $EXIT_CODE } trigger_inference_tests(){ - start_mms_server $MODEL_STORE_DIR $MMS_LOG_FILE_INFERENCE + start_mms_server $MODEL_STORE_DIR $MMS_CONSOLE_LOG_FILE newman run -e $POSTMAN_ENV_FILE $POSTMAN_COLLECTION_INFERENCE -d $POSTMAN_DATA_FILE_INFERENCE \ - -r cli,html --reporter-html-export $REPORT_FILE_INFERENCE --verbose + -r cli,html --reporter-html-export $ARTIFACTS_INFERENCE_DIR/$REPORT_FILE --verbose + local EXIT_CODE=$? stop_mms_server + move_logs $MMS_CONSOLE_LOG_FILE $ARTIFACTS_INFERENCE_DIR + cleanup_model_store + return $EXIT_CODE } trigger_https_tests(){ - start_mms_secure_server $MODEL_STORE_DIR $MMS_LOG_FILE_HTTPS + start_mms_secure_server $MODEL_STORE_DIR $MMS_CONSOLE_LOG_FILE newman run --insecure -e $POSTMAN_ENV_FILE $POSTMAN_COLLECTION_HTTPS \ - -r cli,html --reporter-html-export $REPORT_FILE_HTTPS --verbose + -r cli,html --reporter-html-export $ARTIFACTS_HTTPS_DIR/$REPORT_FILE --verbose + local EXIT_CODE=$? stop_mms_server + move_logs $MMS_CONSOLE_LOG_FILE $ARTIFACTS_HTTPS_DIR + cleanup_model_store + return $EXIT_CODE } -mkdir -p $MODEL_STORE_DIR +cd $BASE_DIR +mkdir -p $MODEL_STORE_DIR $ARTIFACTS_MANAGEMENT_DIR $ARTIFACTS_INFERENCE_DIR $ARTIFACTS_HTTPS_DIR case $1 in 'management') trigger_management_tests + exit $? ;; 'inference') trigger_inference_tests + exit $? ;; 'https') trigger_https_tests + exit $? ;; 'ALL') trigger_management_tests + MGMT_EXIT_CODE=$? trigger_inference_tests + INFR_EXIT_CODE=$? trigger_https_tests + HTTPS_EXIT_CODE=$? + # If any one of the tests fail, exit with error + if [ "$MGMT_EXIT_CODE" -ne 0 ] || [ "$INFR_EXIT_CODE" -ne 0 ] || [ "$HTTPS_EXIT_CODE" -ne 0 ] + then exit 1 + fi ;; *) echo $1 'Invalid' diff --git a/.circleci/scripts/linux_test_benchmark.sh b/.circleci/scripts/linux_test_benchmark.sh index 73c66f58e..98e028ee2 100755 --- a/.circleci/scripts/linux_test_benchmark.sh +++ b/.circleci/scripts/linux_test_benchmark.sh @@ -2,13 +2,24 @@ # Hack needed to make it work with existing benchmark.py # benchmark.py expects jmeter to be present at a very specific location -mkdir -p /home/ubuntu/.linuxbrew/Cellar/jmeter/5.3/libexec/bin/ -ln -s /opt/apache-jmeter-5.3/bin/jmeter /home/ubuntu/.linuxbrew/Cellar/jmeter/5.3/libexec/bin/jmeter +mkdir -p /home/ubuntu/.linuxbrew/Cellar/jmeter/5.3/libexec/ +ln -s /opt/apache-jmeter-5.3/lib/ /home/ubuntu/.linuxbrew/Cellar/jmeter/5.3/libexec/lib +ln -s /opt/apache-jmeter-5.3/bin/ /home/ubuntu/.linuxbrew/Cellar/jmeter/5.3/libexec/bin -multi-model-server --start >> mms.log 2>&1 +# Start MMS and redirect console ouptut and errors to a log file +multi-model-server --start >> mms_console.log 2>&1 sleep 30 cd benchmarks python benchmark.py latency +EXIT_CODE=$? -multi-model-server --stop \ No newline at end of file +multi-model-server --stop + +# Moving MMS console log file to logs directory +# Just a convenience for CircleCI to pick up logs from one directory +cd ../ +mv mms_console.log logs/ + +# Exit with the same error code as that of benchmark script +exit $EXIT_CODE \ No newline at end of file diff --git a/.circleci/scripts/linux_test_modelarchiver.sh b/.circleci/scripts/linux_test_modelarchiver.sh index bdae61a65..d08ad476d 100755 --- a/.circleci/scripts/linux_test_modelarchiver.sh +++ b/.circleci/scripts/linux_test_modelarchiver.sh @@ -4,14 +4,23 @@ cd model-archiver/ # Lint test pylint -rn --rcfile=./model_archiver/tests/pylintrc model_archiver/. +PY_LINT_EXIT_CODE=$? # Execute python unit tests -python -m pytest --cov-report html:results_units --cov=./ model_archiver/tests/unit_tests +python -m pytest --cov-report html:result_units --cov=./ model_archiver/tests/unit_tests +PY_UNITS_EXIT_CODE=$? # Install model archiver module -pip install . +python setup.py bdist_wheel --universal && \ +pip install dist/*.whl +MODL_ARCHVR_EXIT_CODE=$? # Execute integration tests -python -m pytest model_archiver/tests/integ_tests -# ToDo - Report for Integration tests ? \ No newline at end of file +python -m pytest model_archiver/tests/integ_tests # ToDo - Report for Integration tests ? +PY_INTEG_EXIT_CODE=$? + +# If any one of the steps fail, exit with error +if [ "$PY_LINT_EXIT_CODE" -ne 0 ] || [ "$PY_UNITS_EXIT_CODE" -ne 0 ] || [ "$MODL_ARCHVR_EXIT_CODE" -ne 0 ] || [ "$PY_INTEG_EXIT_CODE" -ne 0 ] +then exit 1 +fi \ No newline at end of file diff --git a/.circleci/scripts/linux_test_perf_regression.sh b/.circleci/scripts/linux_test_perf_regression.sh index 6d3f80764..3698ab9c2 100755 --- a/.circleci/scripts/linux_test_perf_regression.sh +++ b/.circleci/scripts/linux_test_perf_regression.sh @@ -1,28 +1,31 @@ #!/bin/bash -multi-model-server --start \ - --models squeezenet=https://s3.amazonaws.com/model-server/model_archive_1.0/squeezenet_v1.1.mar \ - >> mms.log 2>&1 -sleep 90 +ARTIFACTS_DIR='run_artifacts' +RESULT_DIR=$ARTIFACTS_DIR'/report/performance/' +JMETER_PATH='/opt/apache-jmeter-5.3/bin/jmeter' -cd performance_regression +cd tests/performance # Only on a python 2 environment - PY_MAJOR_VER=$(python -c 'import sys; major = sys.version_info.major; print(major);') if [ $PY_MAJOR_VER -eq 2 ]; then # Hack to use python 3.6.5 for bzt installation and execution + # While MMS continues to use system python which is at 2.7.x export PATH="/root/.pyenv/bin:/root/.pyenv/shims:$PATH" - pyenv local 3.6.5 + pyenv local 3.6.5 system fi # Install dependencies +pip install -r requirements.txt pip install bzt -curl -O https://s3.amazonaws.com/model-server/inputs/kitten.jpg -bzt -o modules.jmeter.path=/opt/apache-jmeter-5.3/bin/jmeter \ - -o settings.artifacts-dir=/tmp/mms-performance-regression/ \ - -o modules.console.disable=true \ - imageInputModelPlan.jmx.yaml \ - -report +# Execute performance test suite and store exit code +./run_performance_suite.py -j $JMETER_PATH -e ci_linux_medium -x example* --no-compare-local --no-monit +EXIT_CODE=$? -multi-model-server --stop \ No newline at end of file +# Collect and store test results in result directory to be picked up by CircleCI +mkdir -p $RESULT_DIR +cp $ARTIFACTS_DIR/**/performance_results.xml $RESULT_DIR + +# Exit with the same error code as that of test execution +exit $EXIT_CODE diff --git a/.circleci/scripts/linux_test_python.sh b/.circleci/scripts/linux_test_python.sh index 9af6d1e5b..5bcedce95 100755 --- a/.circleci/scripts/linux_test_python.sh +++ b/.circleci/scripts/linux_test_python.sh @@ -2,6 +2,13 @@ # Lint Test pylint -rn --rcfile=./mms/tests/pylintrc mms/. +PY_LINT_EXIT_CODE=$? # Execute python tests -python -m pytest --cov-report html:htmlcov --cov=mms/ mms/tests/unit_tests/ \ No newline at end of file +python -m pytest --cov-report html:result_units --cov=mms/ mms/tests/unit_tests/ +PYTEST_EXIT_CODE=$? + +# If any one of the tests fail, exit with error +if [ "$PY_LINT_EXIT_CODE" -ne 0 ] || [ "$PYTEST_EXIT_CODE" -ne 0 ] +then exit 1 +fi \ No newline at end of file diff --git a/performance_regression/imageInputModelPlan.jmx.yaml b/performance_regression/imageInputModelPlan.jmx.yaml deleted file mode 100644 index c662874d0..000000000 --- a/performance_regression/imageInputModelPlan.jmx.yaml +++ /dev/null @@ -1,51 +0,0 @@ ---- -execution: -- concurrency: 1 - ramp-up: 5s - hold-for: 1m - scenario: Inference -scenarios: - Inference: - default-address: ${__P(protocol,https)}://${__P(hostname,127.0.0.1)}:${__P(port,8443)}/ - requests: - - follow-redirects: true - label: Inference Request - method: POST - upload-files: - - mime-type: image/jpeg - param: data - path: ${__P(input_filepath)} - url: ${__P(protocol,http)}://${__P(hostname,127.0.0.1)}:${__P(port,8080)}/predictions/${model} - store-cache: false - store-cookie: false - use-dns-cache-mgr: false - variables: - cnn_url: ${__P(url, https://s3.amazonaws.com/model-server/models/squeezenet_v1.1/squeezenet_v1.1.model)} - model: ${__P(model_name,squeezenet_v1.1)} - scale_down_workers: '0' - scale_up_workers: ${__P(min_workers,1)} -modules: - jmeter: - properties: - input_filepath : kitten.jpg - model_name : squeezenet -services: - - module: monitoring - local: - - interval: 2s - logging: True - metrics: - - cpu - - disk-space - - mem -reporting: -- module: passfail - criteria: - - class: bzt.modules.monitoring.MonitoringCriteria - subject: local/cpu - condition: '>' - threshold: 100 - timeframe: 6s -- module: junit-xml - filename: ${TAURUS_ARTIFACTS_DIR}/output/results.xml - data-source: pass-fail diff --git a/run_circleci_tests.py b/run_circleci_tests.py index 5001c0006..1eb6196de 100755 --- a/run_circleci_tests.py +++ b/run_circleci_tests.py @@ -3,9 +3,9 @@ - This script helps to execute circleci jobs in a container on developer's local machine. - The script accepts workflow(mandatory), job(optional) and executor(optional) arguments. - The script used circleci cli's process command to generate a processed yaml. -- The processed yaml, is parsed and twekaed to generate a new transformed yaml. +- The processed yaml, is parsed and tweaked to generate a new transformed yaml. - The transformed yaml contains a single job, which is merged and ordered list of job steps -from the specfied and requird parent jobs. +from the specified and required parent jobs. """ # Make sure you have following dependencies installed on your local machine diff --git a/test/README.md b/tests/api/README.md similarity index 94% rename from test/README.md rename to tests/api/README.md index cc30f24cd..3d670c18a 100644 --- a/test/README.md +++ b/tests/api/README.md @@ -25,11 +25,11 @@ cd multi-model-server ``` To execute tests on master run: -`./test/regression_tests.sh ` +`./tests/api/regression_tests.sh ` To execute tests on different run: -`./test/regression_tests.sh ` +`./tests/api/regression_tests.sh ` You can view the logs for Test execution & the Multi-model-server in the /tmp dir. diff --git a/test/postman/environment.json b/tests/api/postman/environment.json similarity index 100% rename from test/postman/environment.json rename to tests/api/postman/environment.json diff --git a/test/postman/https_test_collection.json b/tests/api/postman/https_test_collection.json similarity index 99% rename from test/postman/https_test_collection.json rename to tests/api/postman/https_test_collection.json index 175f1bc42..5e21dc48d 100644 --- a/test/postman/https_test_collection.json +++ b/tests/api/postman/https_test_collection.json @@ -273,7 +273,7 @@ "body": { "mode": "file", "file": { - "src": "../examples/image_classifier/kitten.jpg" + "src": "resources/kitten.jpg" }, "options": { "raw": { diff --git a/test/postman/inference_api_test_collection.json b/tests/api/postman/inference_api_test_collection.json similarity index 100% rename from test/postman/inference_api_test_collection.json rename to tests/api/postman/inference_api_test_collection.json diff --git a/test/postman/inference_data.json b/tests/api/postman/inference_data.json similarity index 95% rename from test/postman/inference_data.json rename to tests/api/postman/inference_data.json index b4eb7fb8a..9cfd15ef5 100644 --- a/test/postman/inference_data.json +++ b/tests/api/postman/inference_data.json @@ -4,7 +4,7 @@ "model_name":"alexnet", "worker":1, "synchronous":"true", - "file":"test/resources/kitten.jpg", + "file":"resources/kitten.jpg", "content-type":"application/json", "validator":"image_classification", "expected":[ @@ -36,7 +36,7 @@ "model_name":"caffenet", "worker":1, "synchronous":"true", - "file":"test/resources/kitten.jpg", + "file":"resources/kitten.jpg", "content-type":"application/json", "validator":"image_classification", "expected":[ @@ -68,7 +68,7 @@ "model_name":"inception_v1", "worker":1, "synchronous":"true", - "file":"test/resources/kitten.jpg", + "file":"resources/kitten.jpg", "content-type":"application/json", "validator":"image_classification", "expected":[ @@ -100,7 +100,7 @@ "model_name":"inception-bn", "worker":1, "synchronous":"true", - "file":"test/resources/kitten.jpg", + "file":"resources/kitten.jpg", "content-type":"application/json", "validator":"image_classification", "expected":[ @@ -132,7 +132,7 @@ "model_name":"mobilenet", "worker":1, "synchronous":"true", - "file":"test/resources/kitten.jpg", + "file":"resources/kitten.jpg", "content-type":"application/json", "validator":"image_classification", "expected":[ @@ -164,7 +164,7 @@ "model_name":"nin", "worker":1, "synchronous":"true", - "file":"test/resources/kitten.jpg", + "file":"resources/kitten.jpg", "content-type":"application/json", "validator":"image_classification", "expected":[ @@ -196,7 +196,7 @@ "model_name":"resnet-152", "worker":1, "synchronous":"true", - "file":"test/resources/kitten.jpg", + "file":"resources/kitten.jpg", "content-type":"application/json", "validator":"image_classification", "expected":[ @@ -228,7 +228,7 @@ "model_name":"resnet-18", "worker":1, "synchronous":"true", - "file":"test/resources/kitten.jpg", + "file":"resources/kitten.jpg", "content-type":"application/json", "validator":"image_classification", "expected":[ @@ -260,7 +260,7 @@ "model_name":"resnext101", "worker":1, "synchronous":"true", - "file":"test/resources/kitten.jpg", + "file":"resources/kitten.jpg", "content-type":"application/json", "validator":"image_classification", "expected":[ @@ -292,7 +292,7 @@ "model_name":"resnet18-v1", "worker":1, "synchronous":"true", - "file":"test/resources/kitten.jpg", + "file":"resources/kitten.jpg", "content-type":"application/json", "validator":"image_classification", "expected":[ @@ -324,7 +324,7 @@ "model_name":"resnet34-v1", "worker":1, "synchronous":"true", - "file":"test/resources/kitten.jpg", + "file":"resources/kitten.jpg", "content-type":"application/json", "validator":"image_classification", "expected":[ @@ -356,7 +356,7 @@ "model_name":"resnet50-v1", "worker":1, "synchronous":"true", - "file":"test/resources/kitten.jpg", + "file":"resources/kitten.jpg", "content-type":"application/json", "validator":"image_classification", "expected":[ @@ -388,7 +388,7 @@ "model_name":"resnet101-v1", "worker":1, "synchronous":"true", - "file":"test/resources/kitten.jpg", + "file":"resources/kitten.jpg", "content-type":"application/json", "validator":"image_classification", "expected":[ @@ -420,7 +420,7 @@ "model_name":"resnet152-v1", "worker":1, "synchronous":"true", - "file":"test/resources/kitten.jpg", + "file":"resources/kitten.jpg", "content-type":"application/json", "validator":"image_classification", "expected":[ @@ -452,7 +452,7 @@ "model_name":"resnet18-v2", "worker":1, "synchronous":"true", - "file":"test/resources/kitten.jpg", + "file":"resources/kitten.jpg", "content-type":"application/json", "validator":"image_classification", "expected":[ @@ -484,7 +484,7 @@ "model_name":"resnet34-v2", "worker":1, "synchronous":"true", - "file":"test/resources/kitten.jpg", + "file":"resources/kitten.jpg", "content-type":"application/json", "validator":"image_classification", "expected":[ @@ -516,7 +516,7 @@ "model_name":"resnet50-v2", "worker":1, "synchronous":"true", - "file":"test/resources/kitten.jpg", + "file":"resources/kitten.jpg", "content-type":"application/json", "validator":"image_classification", "expected":[ @@ -548,7 +548,7 @@ "model_name":"resnet101-v2", "worker":1, "synchronous":"true", - "file":"test/resources/kitten.jpg", + "file":"resources/kitten.jpg", "content-type":"application/json", "validator":"image_classification", "expected":[ @@ -580,7 +580,7 @@ "model_name":"resnet152-v2", "worker":1, "synchronous":"true", - "file":"test/resources/kitten.jpg", + "file":"resources/kitten.jpg", "content-type":"application/json", "validator":"image_classification", "expected":[ @@ -612,7 +612,7 @@ "model_name":"shufflenet", "worker":1, "synchronous":"true", - "file":"test/resources/kitten.jpg", + "file":"resources/kitten.jpg", "content-type":"application/json", "validator":"image_classification", "expected":[ @@ -644,7 +644,7 @@ "model_name":"onnx-squeezenet", "worker":1, "synchronous":"true", - "file":"test/resources/kitten.jpg", + "file":"resources/kitten.jpg", "content-type":"application/json", "validator":"image_classification", "expected":[ @@ -676,7 +676,7 @@ "model_name":"squeezenet_v1.1", "worker":1, "synchronous":"true", - "file":"test/resources/kitten.jpg", + "file":"resources/kitten.jpg", "content-type":"application/json", "validator":"image_classification", "expected":[ @@ -708,7 +708,7 @@ "model_name":"vgg16", "worker":1, "synchronous":"true", - "file":"test/resources/kitten.jpg", + "file":"resources/kitten.jpg", "content-type":"application/json", "validator":"image_classification", "expected":[ @@ -740,7 +740,7 @@ "model_name":"onnx-vgg16", "worker":1, "synchronous":"true", - "file":"test/resources/kitten.jpg", + "file":"resources/kitten.jpg", "content-type":"application/json", "validator":"image_classification", "expected":[ @@ -772,7 +772,7 @@ "model_name":"onnx-vgg16_bn", "worker":1, "synchronous":"true", - "file":"test/resources/kitten.jpg", + "file":"resources/kitten.jpg", "content-type":"application/json", "validator":"image_classification", "expected":[ @@ -804,7 +804,7 @@ "model_name":"vgg19", "worker":1, "synchronous":"true", - "file":"test/resources/kitten.jpg", + "file":"resources/kitten.jpg", "content-type":"application/json", "validator":"image_classification", "expected":[ @@ -836,7 +836,7 @@ "model_name":"onnx-vgg19", "worker":1, "synchronous":"true", - "file":"test/resources/kitten.jpg", + "file":"resources/kitten.jpg", "content-type":"application/json", "validator":"image_classification", "expected":[ @@ -868,7 +868,7 @@ "model_name":"onnx-vgg19_bn", "worker":1, "synchronous":"true", - "file":"test/resources/kitten.jpg", + "file":"resources/kitten.jpg", "content-type":"application/json", "validator":"image_classification", "expected":[ diff --git a/test/postman/management_api_test_collection.json b/tests/api/postman/management_api_test_collection.json similarity index 100% rename from test/postman/management_api_test_collection.json rename to tests/api/postman/management_api_test_collection.json diff --git a/test/regression_tests.sh b/tests/api/regression_tests.sh old mode 100644 new mode 100755 similarity index 77% rename from test/regression_tests.sh rename to tests/api/regression_tests.sh index 8825ee6ad..0e5e2f6c6 --- a/test/regression_tests.sh +++ b/tests/api/regression_tests.sh @@ -48,7 +48,7 @@ stop_mms_serve() { start_secure_mms() { # Start MMS with Model Store - multi-model-server --start --mms-config test/resources/config.properties --model-store $1 &>> $2 + multi-model-server --start --mms-config resources/config.properties --model-store $1 &>> $2 sleep 10 curl --insecure -X GET https://127.0.0.1:8444/models } @@ -57,25 +57,25 @@ start_secure_mms() { run_postman_test() { # Run Postman Scripts mkdir $ROOT_DIR/report/ - cd $CODEBUILD_WD/ + cd $CODEBUILD_WD/tests/api/ set +e # Run Management API Tests stop_mms_serve start_mms $MODEL_STORE $MMS_LOG_FILE - newman run -e test/postman/environment.json --bail --verbose test/postman/management_api_test_collection.json \ + newman run -e postman/environment.json --bail --verbose postman/management_api_test_collection.json \ -r cli,html --reporter-html-export $ROOT_DIR/report/management_report.html >>$1 2>&1 # Run Inference API Tests after Restart stop_mms_serve start_mms $MODEL_STORE $MMS_LOG_FILE - newman run -e test/postman/environment.json --bail --verbose test/postman/inference_api_test_collection.json \ - -d test/postman/inference_data.json -r cli,html --reporter-html-export $ROOT_DIR/report/inference_report.html >>$1 2>&1 + newman run -e postman/environment.json --bail --verbose postman/inference_api_test_collection.json \ + -d postman/inference_data.json -r cli,html --reporter-html-export $ROOT_DIR/report/inference_report.html >>$1 2>&1 # Run Https test cases stop_mms_serve start_secure_mms $MODEL_STORE $MMS_LOG_FILE - newman run --insecure -e test/postman/environment.json --bail --verbose test/postman/https_test_collection.json \ + newman run --insecure -e postman/environment.json --bail --verbose postman/https_test_collection.json \ -r cli,html --reporter-html-export $ROOT_DIR/report/MMS_https_test_report.html >>$1 2>&1 stop_mms_serve diff --git a/test/resources/certs.pem b/tests/api/resources/certs.pem similarity index 100% rename from test/resources/certs.pem rename to tests/api/resources/certs.pem diff --git a/test/resources/config.properties b/tests/api/resources/config.properties similarity index 50% rename from test/resources/config.properties rename to tests/api/resources/config.properties index ce6e2f3b9..ed79a84c2 100644 --- a/test/resources/config.properties +++ b/tests/api/resources/config.properties @@ -1,4 +1,4 @@ inference_address=https://127.0.0.1:8443 management_address=https://127.0.0.1:8444 -private_key_file=test/resources/key.pem -certificate_file=test/resources/certs.pem +private_key_file=resources/key.pem +certificate_file=resources/certs.pem diff --git a/test/resources/key.pem b/tests/api/resources/key.pem similarity index 100% rename from test/resources/key.pem rename to tests/api/resources/key.pem diff --git a/test/resources/kitten.jpg b/tests/api/resources/kitten.jpg similarity index 100% rename from test/resources/kitten.jpg rename to tests/api/resources/kitten.jpg diff --git a/test/screenshot/postman.png b/tests/api/screenshot/postman.png similarity index 100% rename from test/screenshot/postman.png rename to tests/api/screenshot/postman.png diff --git a/tests/performance/run_performance_suite.py b/tests/performance/run_performance_suite.py index 45948dff4..eb1f616d9 100755 --- a/tests/performance/run_performance_suite.py +++ b/tests/performance/run_performance_suite.py @@ -1,4 +1,4 @@ - +#!/usr/bin/env python # Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. # Licensed under the Apache License, Version 2.0 (the "License"). diff --git a/tests/performance/tests/api_description/api_description.yaml b/tests/performance/tests/api_description/api_description.yaml index da3316228..9a13aae05 100644 --- a/tests/performance/tests/api_description/api_description.yaml +++ b/tests/performance/tests/api_description/api_description.yaml @@ -16,10 +16,12 @@ modules: services: - module: shellexec prepare: + - "ps aux | grep '[c]om.amazonaws.ml.mms.ModelServer' | awk '{print $2}' | xargs kill -9" - "multi-model-server --start > /dev/null 2>&1" - "sleep 10s" post-process: - "multi-model-server --stop > /dev/null 2>&1" + - "sleep 10s" - module: server_local_monitoring ServerLocalClient: - interval: 1s diff --git a/tests/performance/tests/api_description/environments/ci_linux_medium.yaml b/tests/performance/tests/api_description/environments/ci_linux_medium.yaml new file mode 100644 index 000000000..bc9f42172 --- /dev/null +++ b/tests/performance/tests/api_description/environments/ci_linux_medium.yaml @@ -0,0 +1,10 @@ +--- +settings: + env: + MGMT_DESC_SUCC: 100% + INFR_DESC_SUCC: 100% + MGMT_DESC_RT : 20ms + INFR_DESC_RT : 20ms + TOTAL_PROCS : 1 + TOTAL_FDS : 490 + TOTAL_MEM: 888000000 #888MB diff --git a/tests/performance/tests/api_description/environments/xlarge.yaml b/tests/performance/tests/api_description/environments/macos_xlarge.yaml similarity index 100% rename from tests/performance/tests/api_description/environments/xlarge.yaml rename to tests/performance/tests/api_description/environments/macos_xlarge.yaml diff --git a/tests/performance/tests/batch_and_single_inference/batch_and_single_inference.yaml b/tests/performance/tests/batch_and_single_inference/batch_and_single_inference.yaml index 73e9ab957..4e81be8d7 100644 --- a/tests/performance/tests/batch_and_single_inference/batch_and_single_inference.yaml +++ b/tests/performance/tests/batch_and_single_inference/batch_and_single_inference.yaml @@ -17,6 +17,7 @@ modules: services: - module: shellexec prepare: + - "ps aux | grep '[c]om.amazonaws.ml.mms.ModelServer' | awk '{print $2}' | xargs kill -9" - "curl -s -O https://s3.amazonaws.com/model-server/inputs/kitten.jpg" - "multi-model-server --start > /dev/null 2>&1" - "sleep 20s" @@ -28,6 +29,7 @@ services: - "curl -s -X PUT http://localhost:8081/models/squeezenet_v1.1?min_worker=2&synchronous=true" post-process: - "multi-model-server --stop > /dev/null 2>&1" + - "sleep 10" - "rm kitten.jpg" - module: server_local_monitoring # should be added in modules section ServerLocalClient: # keyword from metrics_monitoring_inproc.Monitor diff --git a/tests/performance/tests/batch_and_single_inference/environments/ci_linux_medium.yaml b/tests/performance/tests/batch_and_single_inference/environments/ci_linux_medium.yaml new file mode 100644 index 000000000..12770a3cd --- /dev/null +++ b/tests/performance/tests/batch_and_single_inference/environments/ci_linux_medium.yaml @@ -0,0 +1,9 @@ +--- +settings: + env: + INFR1_RT : 5s + INFR2_RT : 200ms + TOTAL_WORKERS_MEM : 1630000000 #1.63GB + TOTAL_WORKERS : 5 + TOTAL_ORPHANS : 0 + TOTAL_WORKERS_FDS : 44 diff --git a/tests/performance/tests/batch_and_single_inference/environments/xlarge.yaml b/tests/performance/tests/batch_and_single_inference/environments/macos_xlarge.yaml similarity index 100% rename from tests/performance/tests/batch_and_single_inference/environments/xlarge.yaml rename to tests/performance/tests/batch_and_single_inference/environments/macos_xlarge.yaml diff --git a/tests/performance/tests/batch_inference/batch_inference.yaml b/tests/performance/tests/batch_inference/batch_inference.yaml index 7c4485c06..123083c1b 100644 --- a/tests/performance/tests/batch_inference/batch_inference.yaml +++ b/tests/performance/tests/batch_inference/batch_inference.yaml @@ -17,6 +17,7 @@ modules: services: - module: shellexec prepare: + - "ps aux | grep '[c]om.amazonaws.ml.mms.ModelServer' | awk '{print $2}' | xargs kill -9" - "curl -s -O https://s3.amazonaws.com/model-server/inputs/kitten.jpg" - "multi-model-server --start > /dev/null 2>&1" - "sleep 20s" @@ -26,6 +27,7 @@ services: - "curl -s -X PUT http://localhost:8081/models/resnet-152?min_worker=2&synchronous=true" post-process: - "multi-model-server --stop > /dev/null 2>&1" + - "sleep 10" - "rm kitten.jpg" - module: server_local_monitoring # should be added in modules section ServerLocalClient: # keyword from metrics_monitoring_inproc.Monitor diff --git a/tests/performance/tests/batch_inference/environments/ci_linux_medium.yaml b/tests/performance/tests/batch_inference/environments/ci_linux_medium.yaml new file mode 100644 index 000000000..623067af3 --- /dev/null +++ b/tests/performance/tests/batch_inference/environments/ci_linux_medium.yaml @@ -0,0 +1,8 @@ +--- +settings: + env: + INFR_RT : 5s + TOTAL_WORKERS_MEM : 1300000000 #1.3GB + TOTAL_WORKERS : 2 + TOTAL_ORPHANS : 0 + TOTAL_WORKERS_FDS : 22 \ No newline at end of file diff --git a/tests/performance/tests/batch_inference/environments/xlarge.yaml b/tests/performance/tests/batch_inference/environments/macos_xlarge.yaml similarity index 100% rename from tests/performance/tests/batch_inference/environments/xlarge.yaml rename to tests/performance/tests/batch_inference/environments/macos_xlarge.yaml diff --git a/tests/performance/tests/examples_local_criteria/environments/xlarge.yaml b/tests/performance/tests/examples_local_criteria/environments/ci_linux_medium.yaml similarity index 100% rename from tests/performance/tests/examples_local_criteria/environments/xlarge.yaml rename to tests/performance/tests/examples_local_criteria/environments/ci_linux_medium.yaml diff --git a/tests/performance/tests/examples_local_criteria/environments/macos_xlarge.yaml b/tests/performance/tests/examples_local_criteria/environments/macos_xlarge.yaml new file mode 100644 index 000000000..6c3835292 --- /dev/null +++ b/tests/performance/tests/examples_local_criteria/environments/macos_xlarge.yaml @@ -0,0 +1,8 @@ +--- +settings: + env: + FAIL : 100% + P90 : 290ms + AVG_RT : 1s + TOTAL_WORKERS_MEM : 132000000 + PERCENT_DIFF_TOTAL_WORKERS_MEM : 5 diff --git a/tests/performance/tests/examples_local_criteria/examples_local_criteria.yaml b/tests/performance/tests/examples_local_criteria/examples_local_criteria.yaml index 9d8b87907..039a31684 100644 --- a/tests/performance/tests/examples_local_criteria/examples_local_criteria.yaml +++ b/tests/performance/tests/examples_local_criteria/examples_local_criteria.yaml @@ -17,11 +17,13 @@ modules: services: - module: shellexec prepare: + - "ps aux | grep '[c]om.amazonaws.ml.mms.ModelServer' | awk '{print $2}' | xargs kill -9" - "curl -s -O https://s3.amazonaws.com/model-server/inputs/kitten.jpg" - "multi-model-server --start > /dev/null 2>&1" - "sleep 10s" post-process: - "multi-model-server --stop > /dev/null 2>&1" + - "sleep 10" - "rm kitten.jpg" - module: server_local_monitoring # should be added in modules section ServerLocalClient: # keyword from metrics_monitoring_inproc.Monitor diff --git a/tests/performance/tests/examples_local_monitoring/examples_local_monitoring.yaml b/tests/performance/tests/examples_local_monitoring/examples_local_monitoring.yaml index d00226470..2d01cf64f 100644 --- a/tests/performance/tests/examples_local_monitoring/examples_local_monitoring.yaml +++ b/tests/performance/tests/examples_local_monitoring/examples_local_monitoring.yaml @@ -16,11 +16,13 @@ modules: services: - module: shellexec prepare: + - "ps aux | grep '[c]om.amazonaws.ml.mms.ModelServer' | awk '{print $2}' | xargs kill -9" - "curl -s -O https://s3.amazonaws.com/model-server/inputs/kitten.jpg" - "multi-model-server --start > /dev/null 2>&1" - "sleep 10s" post-process: - "multi-model-server --stop > /dev/null 2>&1" + - "sleep 10" - "rm kitten.jpg" - module: server_local_monitoring # should be added in modules section ServerLocalClient: # keyword from metrics_monitoring_inproc.Monitor diff --git a/tests/performance/tests/examples_remote_criteria/environments/xlarge.yaml b/tests/performance/tests/examples_remote_criteria/environments/ci_linux_medium.yaml similarity index 100% rename from tests/performance/tests/examples_remote_criteria/environments/xlarge.yaml rename to tests/performance/tests/examples_remote_criteria/environments/ci_linux_medium.yaml diff --git a/tests/performance/tests/examples_remote_criteria/environments/macos_xlarge.yaml b/tests/performance/tests/examples_remote_criteria/environments/macos_xlarge.yaml new file mode 100644 index 000000000..674a6c1ff --- /dev/null +++ b/tests/performance/tests/examples_remote_criteria/environments/macos_xlarge.yaml @@ -0,0 +1,7 @@ +--- +settings: + env: + FAIL : 50% + P90 : 250ms + AVG_RT : 1s + TOTAL_WORKERS_FDS : 80 diff --git a/tests/performance/tests/examples_remote_criteria/examples_remote_criteria.yaml b/tests/performance/tests/examples_remote_criteria/examples_remote_criteria.yaml index 0c3c206d1..44684d905 100644 --- a/tests/performance/tests/examples_remote_criteria/examples_remote_criteria.yaml +++ b/tests/performance/tests/examples_remote_criteria/examples_remote_criteria.yaml @@ -12,11 +12,13 @@ scenarios: services: - module: shellexec prepare: + - "ps aux | grep '[c]om.amazonaws.ml.mms.ModelServer' | awk '{print $2}' | xargs kill -9" - "curl -s -O https://s3.amazonaws.com/model-server/inputs/kitten.jpg" - "multi-model-server --start > /dev/null 2>&1" - "sleep 10s" post-process: - "multi-model-server --stop > /dev/null 2>&1" + - "sleep 10" - "rm kitten.jpg" - module: monitoring server-agent: diff --git a/tests/performance/tests/examples_remote_monitoring/examples_remote_monitoring.yaml b/tests/performance/tests/examples_remote_monitoring/examples_remote_monitoring.yaml index 235c3b803..890455eee 100644 --- a/tests/performance/tests/examples_remote_monitoring/examples_remote_monitoring.yaml +++ b/tests/performance/tests/examples_remote_monitoring/examples_remote_monitoring.yaml @@ -14,11 +14,13 @@ scenarios: services: - module: shellexec prepare: + - "ps aux | grep '[c]om.amazonaws.ml.mms.ModelServer' | awk '{print $2}' | xargs kill -9" - "curl -s -O https://s3.amazonaws.com/model-server/inputs/kitten.jpg" - "multi-model-server --start > /dev/null 2>&1" - "sleep 10s" post-process: - "multi-model-server --stop > /dev/null 2>&1" + - "sleep 10" - "rm kitten.jpg" - module: monitoring server-agent: diff --git a/tests/performance/tests/examples_starter/examples_starter.yaml b/tests/performance/tests/examples_starter/examples_starter.yaml index ac6aaa50b..0eb98f09a 100644 --- a/tests/performance/tests/examples_starter/examples_starter.yaml +++ b/tests/performance/tests/examples_starter/examples_starter.yaml @@ -11,10 +11,12 @@ scenarios: services: - module: shellexec prepare: + - "ps aux | grep '[c]om.amazonaws.ml.mms.ModelServer' | awk '{print $2}' | xargs kill -9" - "curl -s -O https://s3.amazonaws.com/model-server/inputs/kitten.jpg" - "multi-model-server --start > /dev/null 2>&1" - "sleep 10s" post-process: - "multi-model-server --stop > /dev/null 2>&1" + - "sleep 10" - "rm kitten.jpg" diff --git a/tests/performance/tests/examples_unregister_while_inferencing/custom_model_for_slow_inference.sh b/tests/performance/tests/examples_unregister_while_inferencing/custom_model_for_slow_inference.sh new file mode 100755 index 000000000..ec8a0f264 --- /dev/null +++ b/tests/performance/tests/examples_unregister_while_inferencing/custom_model_for_slow_inference.sh @@ -0,0 +1,72 @@ +#!/bin/bash + +# 1. This script downloads a model(squeezenet_v1.1.mar) from model zoo +# 2. Extracts(unzip) the model +# 3. Modifies the handle function to have a 20 second sleep at start +# 4. Repackages the model + +BASE_DIR=$(pwd) +STORE_DIR="tmp_store" +MODEL_NAME="squeezenet_v1.1" +MODEL_URL="https://s3.amazonaws.com/model-server/model_archive_1.0/$MODEL_NAME.mar" +HANDLER_FILE_NAME="mxnet_vision_service" + +build(){ + # Create a temporary model store and a workspace inside it + mkdir -p $STORE_DIR/$MODEL_NAME + + # Move to workspace + cd $STORE_DIR/$MODEL_NAME + + # Download the model from model zoo + curl -s -O $MODEL_URL + + # Extract the model, Once extracted remove the downloaded .mar + unzip $MODEL_NAME.mar + rm $MODEL_NAME.mar + + #### Adds a 20 sec wait in the handle function #### + # DO NOT - change any spacing and\or try to format the below code + sed -i'' -e '/import logging/a\ +import time' $HANDLER_FILE_NAME.py + + sed -i'' -e '/def handle(data, context):/a\ +\ \ \ \ time.sleep(20) + ' $HANDLER_FILE_NAME.py + ################################################## + + # Install model-archiver + pip -q install model-archiver > /dev/null 2>&1 + + # Move to model store + cd ../ + + # Create a new model using model archiver + model-archiver --model-name $MODEL_NAME --model-path ./$MODEL_NAME --handler $HANDLER_FILE_NAME:handle + + # Remove workspace + rm -rf $MODEL_NAME + + # Move back to base dir + cd $BASE_DIR +} + +clean(){ + rm -rf $STORE_DIR +} + +case $1 in + 'build') + build + exit $? + ;; + 'clean') + clean + exit $? + ;; + *) + echo $1 'Invalid' + echo 'Please specify any one of - build | clean' + exit 1 + ;; +esac diff --git a/tests/performance/tests/examples_unregister_while_inferencing/environments/ci_linux_medium.yaml b/tests/performance/tests/examples_unregister_while_inferencing/environments/ci_linux_medium.yaml new file mode 100644 index 000000000..f44ae571c --- /dev/null +++ b/tests/performance/tests/examples_unregister_while_inferencing/environments/ci_linux_medium.yaml @@ -0,0 +1,11 @@ +--- +settings: + env: + INFR_SUCC : 100% + UNREG_SUCC: 100% + INFR_RT : 22s + UNREG_RT: 25ms + MIN_TOTAL_PROCS : 1 + MAX_TOTAL_PROCS : 3 + TOTAL_FDS : 498 + FRNTEND_MEM : 250000000 #250MB \ No newline at end of file diff --git a/tests/performance/tests/examples_unregister_while_inferencing/environments/macos_xlarge.yaml b/tests/performance/tests/examples_unregister_while_inferencing/environments/macos_xlarge.yaml new file mode 100644 index 000000000..f4c5be87b --- /dev/null +++ b/tests/performance/tests/examples_unregister_while_inferencing/environments/macos_xlarge.yaml @@ -0,0 +1,11 @@ +--- +settings: + env: + INFR_SUCC : 100% + UNREG_SUCC: 100% + INFR_RT : 22s + UNREG_RT: 25ms + MIN_TOTAL_PROCS : 1 + MAX_TOTAL_PROCS : 3 + TOTAL_FDS : 74 + FRNTEND_MEM : 250000000 #250MB \ No newline at end of file diff --git a/tests/performance/tests/examples_unregister_while_inferencing/examples_unregister_while_inferencing.jmx b/tests/performance/tests/examples_unregister_while_inferencing/examples_unregister_while_inferencing.jmx new file mode 100644 index 000000000..876424545 --- /dev/null +++ b/tests/performance/tests/examples_unregister_while_inferencing/examples_unregister_while_inferencing.jmx @@ -0,0 +1,132 @@ + + + + + + false + true + false + + + + + + + + + + model + squeezenet_v1.1 + = + Model Name + + + + + + + + + ${__P(hostname,127.0.0.1)} + ${__P(port,8443)} + ${__P(protocol,https)} + + + 6 + + + + + + continue + + false + ${__P(loops,4)} + + ${__P(threads,10)} + ${__P(rampup,10)} + false + + + true + + + + + + + ${__P(input_filepath)} + data + image/jpeg + + + + + + + + + + + /predictions/${model} + POST + true + false + true + true + + + + + + + + continue + + false + 1 + + 1 + 1 + false + + + true + + + + 5000 + + + + + + + ${__P(input_filepath)} + data + image/jpeg + + + + + + + + ${__P(management_port,8444)} + + + /models/${model} + DELETE + true + false + true + true + + + + + + + + + diff --git a/tests/performance/tests/examples_unregister_while_inferencing/examples_unregister_while_inferencing.yaml b/tests/performance/tests/examples_unregister_while_inferencing/examples_unregister_while_inferencing.yaml new file mode 100644 index 000000000..4a972e354 --- /dev/null +++ b/tests/performance/tests/examples_unregister_while_inferencing/examples_unregister_while_inferencing.yaml @@ -0,0 +1,76 @@ +--- +execution: +- concurrency: 1 + ramp-up: 0 + iterations: 1 + scenario: examples_unregister_while_inferencing + +scenarios: + examples_unregister_while_inferencing: + script: examples_unregister_while_inferencing.jmx + +modules: + server_local_monitoring: + class : metrics_monitoring_inproc.Monitor + +services: + - module: shellexec + prepare: + - "ps aux | grep '[c]om.amazonaws.ml.mms.ModelServer' | awk '{print $2}' | xargs kill -9" + - "curl -s -O https://s3.amazonaws.com/model-server/inputs/kitten.jpg" + - "./tests/unregister_while_inferencing/custom_model_for_slow_inference.sh build" + - "multi-model-server --start --model-store=tmp_store > /dev/null 2>&1" + - "sleep 20s" + - "curl -s -X POST http://localhost:8081/models?url=squeezenet_v1.1.mar" + - "curl -s -X PUT http://localhost:8081/models/squeezenet_v1.1?min_worker=1&synchronous=true" + post-process: + - "multi-model-server --stop > /dev/null 2>&1" + - "sleep 10" + - "./tests/unregister_while_inferencing/custom_model_for_slow_inference.sh clean" + - "rm kitten.jpg" + - module: server_local_monitoring + ServerLocalClient: + - interval: 1s + logging : True + metrics: + - total_processes + - sum_all_file_descriptors + - sum_all_memory_rss + +reporting: +- module: passfail + criteria: + # Inbuilt Criteria + - success of Inference<${INFR_SUCC}, stop as failed + - success of Unregister<${UNREG_SUCC}, stop as failed + - avg-rt of Inference>${INFR_RT}, stop as failed + - avg-rt of Unregister>${UNREG_RT}, stop as failed + # Custom Criteria + - class: bzt.modules.monitoring.MonitoringCriteria + subject: ServerLocalClient/total_processes + condition: '>' + threshold: ${MAX_TOTAL_PROCS} + timeframe: 1s + stop : true + fail : true + - class: bzt.modules.monitoring.MonitoringCriteria + subject: ServerLocalClient/total_processes + condition: '<' + threshold: ${MIN_TOTAL_PROCS} + timeframe: 1s + stop : true + fail : true + - class: bzt.modules.monitoring.MonitoringCriteria + subject: ServerLocalClient/sum_all_file_descriptors + condition: '>' + threshold: ${TOTAL_FDS} + timeframe: 1s + stop : true + fail : true +# - class: bzt.modules.monitoring.MonitoringCriteria +# subject: ServerLocalClient/sum_all_memory_rss +# condition: '>' +# threshold: ${FRNTEND_MEM} +# timeframe: 5s +# stop : true +# fail : true diff --git a/tests/performance/tests/health_check/environments/ci_linux_medium.yaml b/tests/performance/tests/health_check/environments/ci_linux_medium.yaml new file mode 100644 index 000000000..d5e421edb --- /dev/null +++ b/tests/performance/tests/health_check/environments/ci_linux_medium.yaml @@ -0,0 +1,8 @@ +--- +settings: + env: + HLTH_CHK_SUCC : 100% + HLTH_CHK_RT : 40ms + TOTAL_PROCS : 1 + TOTAL_FDS : 480 + TOTAL_MEM : 500000000 #500MB \ No newline at end of file diff --git a/tests/performance/tests/health_check/environments/xlarge.yaml b/tests/performance/tests/health_check/environments/macos_xlarge.yaml similarity index 100% rename from tests/performance/tests/health_check/environments/xlarge.yaml rename to tests/performance/tests/health_check/environments/macos_xlarge.yaml diff --git a/tests/performance/tests/health_check/health_check.yaml b/tests/performance/tests/health_check/health_check.yaml index 2c8785e3c..c1a269773 100644 --- a/tests/performance/tests/health_check/health_check.yaml +++ b/tests/performance/tests/health_check/health_check.yaml @@ -16,10 +16,12 @@ modules: services: - module: shellexec prepare: + - "ps aux | grep '[c]om.amazonaws.ml.mms.ModelServer' | awk '{print $2}' | xargs kill -9" - "multi-model-server --start > /dev/null 2>&1" - "sleep 10s" post-process: - "multi-model-server --stop > /dev/null 2>&1" + - "sleep 10" - module: server_local_monitoring ServerLocalClient: - interval: 1s diff --git a/tests/performance/tests/inference_multiple_models/environments/ci_linux_medium.yaml b/tests/performance/tests/inference_multiple_models/environments/ci_linux_medium.yaml new file mode 100644 index 000000000..1a0e1dc20 --- /dev/null +++ b/tests/performance/tests/inference_multiple_models/environments/ci_linux_medium.yaml @@ -0,0 +1,10 @@ +--- +settings: + env: + INFR1_SUCC : 100% + INFR2_SUCC: 100% + INFR1_RT : 1s + INFR2_RT: 1.5s + TOTAL_PROCS : 5 + TOTAL_FDS : 521 + TOTAL_MEM : 810000000 #810MB \ No newline at end of file diff --git a/tests/performance/tests/inference_multiple_models/environments/xlarge.yaml b/tests/performance/tests/inference_multiple_models/environments/macos_xlarge.yaml similarity index 100% rename from tests/performance/tests/inference_multiple_models/environments/xlarge.yaml rename to tests/performance/tests/inference_multiple_models/environments/macos_xlarge.yaml diff --git a/tests/performance/tests/inference_multiple_models/inference_multiple_models.yaml b/tests/performance/tests/inference_multiple_models/inference_multiple_models.yaml index 3244c4d8f..cbffe2b68 100644 --- a/tests/performance/tests/inference_multiple_models/inference_multiple_models.yaml +++ b/tests/performance/tests/inference_multiple_models/inference_multiple_models.yaml @@ -16,6 +16,7 @@ modules: services: - module: shellexec prepare: + - "ps aux | grep '[c]om.amazonaws.ml.mms.ModelServer' | awk '{print $2}' | xargs kill -9" - "curl -s -O https://s3.amazonaws.com/model-server/inputs/kitten.jpg" - "multi-model-server --start > /dev/null 2>&1" - "sleep 20s" @@ -25,6 +26,7 @@ services: - "curl -s -X PUT http://localhost:8081/models/resnet-18?min_worker=1&synchronous=true" post-process: - "multi-model-server --stop > /dev/null 2>&1" + - "sleep 10" - "rm kitten.jpg" - module: server_local_monitoring ServerLocalClient: diff --git a/tests/performance/tests/inference_multiple_worker/environments/ci_linux_medium.yaml b/tests/performance/tests/inference_multiple_worker/environments/ci_linux_medium.yaml new file mode 100644 index 000000000..edb6cf462 --- /dev/null +++ b/tests/performance/tests/inference_multiple_worker/environments/ci_linux_medium.yaml @@ -0,0 +1,8 @@ +--- +settings: + env: + INFR_SUCC : 100% + INFR_RT : 400ms + TOTAL_PROCS : 6 + TOTAL_FDS : 540 + TOTAL_MEM : 890000000 #890MB \ No newline at end of file diff --git a/tests/performance/tests/inference_multiple_worker/environments/xlarge.yaml b/tests/performance/tests/inference_multiple_worker/environments/macos_xlarge.yaml similarity index 100% rename from tests/performance/tests/inference_multiple_worker/environments/xlarge.yaml rename to tests/performance/tests/inference_multiple_worker/environments/macos_xlarge.yaml diff --git a/tests/performance/tests/inference_multiple_worker/inference_multiple_worker.yaml b/tests/performance/tests/inference_multiple_worker/inference_multiple_worker.yaml index 5d73624a6..b5fa23c01 100644 --- a/tests/performance/tests/inference_multiple_worker/inference_multiple_worker.yaml +++ b/tests/performance/tests/inference_multiple_worker/inference_multiple_worker.yaml @@ -17,6 +17,7 @@ modules: services: - module: shellexec prepare: + - "ps aux | grep '[c]om.amazonaws.ml.mms.ModelServer' | awk '{print $2}' | xargs kill -9" - "curl -s -O https://s3.amazonaws.com/model-server/inputs/kitten.jpg" - "multi-model-server --start > /dev/null 2>&1" - "sleep 20s" @@ -24,6 +25,7 @@ services: - "curl -s -X PUT http://localhost:8081/models/squeezenet_v1.1?min_worker=4&synchronous=true" post-process: - "multi-model-server --stop > /dev/null 2>&1" + - "sleep 10" - "rm kitten.jpg" - module: server_local_monitoring ServerLocalClient: diff --git a/tests/performance/tests/inference_single_worker/environments/ci_linux_medium.yaml b/tests/performance/tests/inference_single_worker/environments/ci_linux_medium.yaml new file mode 100644 index 000000000..0768b2218 --- /dev/null +++ b/tests/performance/tests/inference_single_worker/environments/ci_linux_medium.yaml @@ -0,0 +1,8 @@ +--- +settings: + env: + INFR_SUCC : 100% + INFR_RT : 800ms + TOTAL_PROCS : 3 + TOTAL_FDS : 503 + TOTAL_MEM : 500000000 #500MB \ No newline at end of file diff --git a/tests/performance/tests/inference_single_worker/environments/xlarge.yaml b/tests/performance/tests/inference_single_worker/environments/macos_xlarge.yaml similarity index 100% rename from tests/performance/tests/inference_single_worker/environments/xlarge.yaml rename to tests/performance/tests/inference_single_worker/environments/macos_xlarge.yaml diff --git a/tests/performance/tests/inference_single_worker/inference_single_worker.yaml b/tests/performance/tests/inference_single_worker/inference_single_worker.yaml index ece9e5b74..2797a69aa 100644 --- a/tests/performance/tests/inference_single_worker/inference_single_worker.yaml +++ b/tests/performance/tests/inference_single_worker/inference_single_worker.yaml @@ -17,6 +17,7 @@ modules: services: - module: shellexec prepare: + - "ps aux | grep '[c]om.amazonaws.ml.mms.ModelServer' | awk '{print $2}' | xargs kill -9" - "curl -s -O https://s3.amazonaws.com/model-server/inputs/kitten.jpg" - "multi-model-server --start > /dev/null 2>&1" - "sleep 20s" @@ -24,6 +25,7 @@ services: - "curl -s -X PUT http://localhost:8081/models/squeezenet_v1.1?min_worker=1&synchronous=true" post-process: - "multi-model-server --stop > /dev/null 2>&1" + - "sleep 10" - "rm kitten.jpg" - module: server_local_monitoring ServerLocalClient: diff --git a/tests/performance/tests/list_models/environments/ci_linux_medium.yaml b/tests/performance/tests/list_models/environments/ci_linux_medium.yaml new file mode 100644 index 000000000..a24d1187b --- /dev/null +++ b/tests/performance/tests/list_models/environments/ci_linux_medium.yaml @@ -0,0 +1,8 @@ +--- +settings: + env: + LST_MODLS_SUCC : 100% + LST_MODLS_RT : 40ms + TOTAL_PROCS : 3 + TOTAL_FDS : 500 + TOTAL_MEM : 570000000 #570MB \ No newline at end of file diff --git a/tests/performance/tests/list_models/environments/xlarge.yaml b/tests/performance/tests/list_models/environments/macos_xlarge.yaml similarity index 100% rename from tests/performance/tests/list_models/environments/xlarge.yaml rename to tests/performance/tests/list_models/environments/macos_xlarge.yaml diff --git a/tests/performance/tests/list_models/list_models.yaml b/tests/performance/tests/list_models/list_models.yaml index 81dd8ada7..d571dcdcd 100644 --- a/tests/performance/tests/list_models/list_models.yaml +++ b/tests/performance/tests/list_models/list_models.yaml @@ -16,12 +16,14 @@ modules: services: - module: shellexec prepare: + - "ps aux | grep '[c]om.amazonaws.ml.mms.ModelServer' | awk '{print $2}' | xargs kill -9" - "multi-model-server --start > /dev/null 2>&1" - "sleep 20s" - "curl -s -X POST http://localhost:8081/models?url=https://s3.amazonaws.com/model-server/model_archive_1.0/squeezenet_v1.1.mar" - "curl -s -X POST http://localhost:8081/models?url=https://s3.amazonaws.com/model-server/model_archive_1.0/shufflenet.mar" post-process: - "multi-model-server --stop > /dev/null 2>&1" + - "sleep 10" - module: server_local_monitoring ServerLocalClient: - interval: 1s diff --git a/tests/performance/tests/model_description/environments/ci_linux_medium.yaml b/tests/performance/tests/model_description/environments/ci_linux_medium.yaml new file mode 100644 index 000000000..2dc2a63f0 --- /dev/null +++ b/tests/performance/tests/model_description/environments/ci_linux_medium.yaml @@ -0,0 +1,8 @@ +--- +settings: + env: + MODL_DESC_SUCC : 100% + MODL_DESC_RT : 40ms + TOTAL_PROCS : 3 + TOTAL_FDS : 503 + TOTAL_MEM : 685000000 #685MB \ No newline at end of file diff --git a/tests/performance/tests/model_description/environments/xlarge.yaml b/tests/performance/tests/model_description/environments/macos_xlarge.yaml similarity index 100% rename from tests/performance/tests/model_description/environments/xlarge.yaml rename to tests/performance/tests/model_description/environments/macos_xlarge.yaml diff --git a/tests/performance/tests/model_description/model_description.yaml b/tests/performance/tests/model_description/model_description.yaml index 05358a53c..7a9a28a35 100644 --- a/tests/performance/tests/model_description/model_description.yaml +++ b/tests/performance/tests/model_description/model_description.yaml @@ -16,12 +16,14 @@ modules: services: - module: shellexec prepare: + - "ps aux | grep '[c]om.amazonaws.ml.mms.ModelServer' | awk '{print $2}' | xargs kill -9" - "multi-model-server --start > /dev/null 2>&1" - "sleep 20s" - "curl -s -X POST http://localhost:8081/models?url=https://s3.amazonaws.com/model-server/model_archive_1.0/squeezenet_v1.1.mar" - "curl -s -X PUT http://localhost:8081/models/squeezenet_v1.1?min_worker=1&synchronous=true" post-process: - "multi-model-server --stop > /dev/null 2>&1" + - "sleep 10" - module: server_local_monitoring ServerLocalClient: - interval: 1s diff --git a/tests/performance/tests/multiple_inference_and_scaling/environments/ci_linux_medium.yaml b/tests/performance/tests/multiple_inference_and_scaling/environments/ci_linux_medium.yaml new file mode 100644 index 000000000..646727d2c --- /dev/null +++ b/tests/performance/tests/multiple_inference_and_scaling/environments/ci_linux_medium.yaml @@ -0,0 +1,12 @@ +--- +settings: + env: + INFR1_SUCC : 100% + INFR2_SUCC: 100% + INFR1_RT : 100ms + INFR2_RT: 250ms + TOTAL_PROCS : 11 + TOTAL_FDS : 608 + TOTAL_MEM : 2000000000 #~2GB + TOTAL_ORPHANS : 0 + FRNTEND_MEM : 800000000 #~800MB \ No newline at end of file diff --git a/tests/performance/tests/multiple_inference_and_scaling/environments/xlarge.yaml b/tests/performance/tests/multiple_inference_and_scaling/environments/macos_xlarge.yaml similarity index 100% rename from tests/performance/tests/multiple_inference_and_scaling/environments/xlarge.yaml rename to tests/performance/tests/multiple_inference_and_scaling/environments/macos_xlarge.yaml diff --git a/tests/performance/tests/multiple_inference_and_scaling/multiple_inference_and_scaling.yaml b/tests/performance/tests/multiple_inference_and_scaling/multiple_inference_and_scaling.yaml index 8f3324f2a..6056e9a90 100644 --- a/tests/performance/tests/multiple_inference_and_scaling/multiple_inference_and_scaling.yaml +++ b/tests/performance/tests/multiple_inference_and_scaling/multiple_inference_and_scaling.yaml @@ -16,6 +16,7 @@ modules: services: - module: shellexec prepare: + - "ps aux | grep '[c]om.amazonaws.ml.mms.ModelServer' | awk '{print $2}' | xargs kill -9" - "curl -s -O https://s3.amazonaws.com/model-server/inputs/kitten.jpg" - "multi-model-server --start > /dev/null 2>&1" - "sleep 20s" @@ -25,6 +26,7 @@ services: - "curl -s -X PUT http://localhost:8081/models/resnet-18?min_worker=1&synchronous=true" post-process: - "multi-model-server --stop > /dev/null 2>&1" + - "sleep 10" - "rm kitten.jpg" - module: server_local_monitoring ServerLocalClient: diff --git a/tests/performance/tests/register_unregister/environments/ci_linux_medium.yaml b/tests/performance/tests/register_unregister/environments/ci_linux_medium.yaml new file mode 100644 index 000000000..62df2bbe0 --- /dev/null +++ b/tests/performance/tests/register_unregister/environments/ci_linux_medium.yaml @@ -0,0 +1,11 @@ +--- +settings: + env: + REG_SUCC : 100% + UNREG_SUCC: 100% + REG_RT : 2.5s + UNREG_RT: 300ms + TOTAL_PROCS : 1 + TOTAL_FDS : 475 + TOTAL_ORPHANS : 0 + FRNTEND_MEM : 100000000 #100MB \ No newline at end of file diff --git a/tests/performance/tests/register_unregister/environments/xlarge.yaml b/tests/performance/tests/register_unregister/environments/macos_xlarge.yaml similarity index 100% rename from tests/performance/tests/register_unregister/environments/xlarge.yaml rename to tests/performance/tests/register_unregister/environments/macos_xlarge.yaml diff --git a/tests/performance/tests/register_unregister/register_unregister.yaml b/tests/performance/tests/register_unregister/register_unregister.yaml index 1feb22487..295010d69 100644 --- a/tests/performance/tests/register_unregister/register_unregister.yaml +++ b/tests/performance/tests/register_unregister/register_unregister.yaml @@ -17,11 +17,13 @@ modules: services: - module: shellexec prepare: + - "ps aux | grep '[c]om.amazonaws.ml.mms.ModelServer' | awk '{print $2}' | xargs kill -9" - "curl -s -O https://s3.amazonaws.com/model-server/inputs/kitten.jpg" - "multi-model-server --start > /dev/null 2>&1" - "sleep 10s" post-process: - "multi-model-server --stop > /dev/null 2>&1" + - "sleep 10" - "rm kitten.jpg" - module: server_local_monitoring ServerLocalClient: diff --git a/tests/performance/tests/register_unregister_multiple/environments/ci_linux_medium.yaml b/tests/performance/tests/register_unregister_multiple/environments/ci_linux_medium.yaml new file mode 100644 index 000000000..15f1ec7ff --- /dev/null +++ b/tests/performance/tests/register_unregister_multiple/environments/ci_linux_medium.yaml @@ -0,0 +1,13 @@ +--- +settings: + env: + REG_SUCC : 100% + SCL_UP_SUCC: 100% + UNREG_SUCC: 100% + REG_RT : 3s + SCL_UP_RT: 2s + UNREG_RT: 500ms + TOTAL_PROCS_WITH_EXTRA_MODEL_AND_WORKERS : 5 + TOTAL_PROCS_WITHOUT_EXTRA_MODEL : 2 + TOTAL_FDS : 524 + FRNTEND_MEM : 425000000 #425MB \ No newline at end of file diff --git a/tests/performance/tests/register_unregister_multiple/environments/xlarge.yaml b/tests/performance/tests/register_unregister_multiple/environments/macos_xlarge.yaml similarity index 100% rename from tests/performance/tests/register_unregister_multiple/environments/xlarge.yaml rename to tests/performance/tests/register_unregister_multiple/environments/macos_xlarge.yaml diff --git a/tests/performance/tests/register_unregister_multiple/register_unregister_multiple.yaml b/tests/performance/tests/register_unregister_multiple/register_unregister_multiple.yaml index 5c8fcb85e..bc00761c6 100644 --- a/tests/performance/tests/register_unregister_multiple/register_unregister_multiple.yaml +++ b/tests/performance/tests/register_unregister_multiple/register_unregister_multiple.yaml @@ -16,12 +16,14 @@ modules: services: - module: shellexec prepare: + - "ps aux | grep '[c]om.amazonaws.ml.mms.ModelServer' | awk '{print $2}' | xargs kill -9" - "curl -s -O https://s3.amazonaws.com/model-server/inputs/kitten.jpg" - "multi-model-server --start > /dev/null 2>&1" - "sleep 20s" - "curl -s -X POST http://localhost:8081/models?url=https://s3.amazonaws.com/model-server/model_archive_1.0/resnet-18.mar" post-process: - "multi-model-server --stop > /dev/null 2>&1" + - "sleep 10" - "rm kitten.jpg" - module: server_local_monitoring ServerLocalClient: @@ -46,7 +48,14 @@ reporting: - class: bzt.modules.monitoring.MonitoringCriteria subject: ServerLocalClient/total_processes condition: '>' - threshold: ${TOTAL_PROCS} + threshold: ${TOTAL_PROCS_WITH_EXTRA_MODEL_AND_WORKERS} + timeframe: 5s + stop : true + fail : true + - class: bzt.modules.monitoring.MonitoringCriteria + subject: ServerLocalClient/total_processes + condition: '<' + threshold: ${TOTAL_PROCS_WITHOUT_EXTRA_MODEL} timeframe: 5s stop : true fail : true diff --git a/tests/performance/tests/scale_down_workers/environments/ci_linux_medium.yaml b/tests/performance/tests/scale_down_workers/environments/ci_linux_medium.yaml new file mode 100644 index 000000000..f65c32c11 --- /dev/null +++ b/tests/performance/tests/scale_down_workers/environments/ci_linux_medium.yaml @@ -0,0 +1,15 @@ +--- +settings: + env: + SCL_DWN_SUCC : 100% + SCL_DWN_RT : 10ms + TOTAL_PROCS_B4_SCL_DWN : 6 + TOTAL_PROCS_AFTR_SCL_DWN : 4 + TOTAL_WRKRS_B4_SCL_DWN : 4 + TOTAL_WRKRS_AFTR_SCL_DWN : 2 + FRNTEND_FDS : 494 + TOTAL_WRKRS_FDS_B4_SCL_DWN: 43 + TOTAL_WRKRS_FDS_AFTR_SCL_DWN: 17 + FRNTEND_MEM : 770000000 #770MB + TOTAL_WRKRS_MEM_B4_SCL_DWN : 430000000 #430MB + TOTAL_WRKRS_MEM_AFTR_SCL_DWN : 200000000 #200MB \ No newline at end of file diff --git a/tests/performance/tests/scale_down_workers/environments/xlarge.yaml b/tests/performance/tests/scale_down_workers/environments/macos_xlarge.yaml similarity index 100% rename from tests/performance/tests/scale_down_workers/environments/xlarge.yaml rename to tests/performance/tests/scale_down_workers/environments/macos_xlarge.yaml diff --git a/tests/performance/tests/scale_down_workers/scale_down_workers.yaml b/tests/performance/tests/scale_down_workers/scale_down_workers.yaml index dc8cc1382..b9f92ffbc 100644 --- a/tests/performance/tests/scale_down_workers/scale_down_workers.yaml +++ b/tests/performance/tests/scale_down_workers/scale_down_workers.yaml @@ -16,12 +16,14 @@ modules: services: - module: shellexec prepare: + - "ps aux | grep '[c]om.amazonaws.ml.mms.ModelServer' | awk '{print $2}' | xargs kill -9" - "multi-model-server --start > /dev/null 2>&1" - "sleep 20s" - "curl -s -X POST http://localhost:8081/models?url=https://s3.amazonaws.com/model-server/model_archive_1.0/squeezenet_v1.1.mar" - "curl -s -X PUT http://localhost:8081/models/squeezenet_v1.1?min_worker=4&synchronous=true" post-process: - "multi-model-server --stop > /dev/null 2>&1" + - "sleep 10" - module: server_local_monitoring ServerLocalClient: - interval: 1s diff --git a/tests/performance/tests/scale_up_workers/environments/ci_linux_medium.yaml b/tests/performance/tests/scale_up_workers/environments/ci_linux_medium.yaml new file mode 100644 index 000000000..cc098d358 --- /dev/null +++ b/tests/performance/tests/scale_up_workers/environments/ci_linux_medium.yaml @@ -0,0 +1,15 @@ +--- +settings: + env: + SCL_UP_SUCC : 100% + SCL_UP_RT : 10ms + TOTAL_PROCS_AFTR_SCL_UP : 6 + TOTAL_PROCS_B4_SCL_UP : 3 + TOTAL_WRKRS_AFTR_SCL_UP : 4 + TOTAL_WRKRS_B4_SCL_UP : 1 + FRNTEND_FDS : 499 + TOTAL_WRKRS_FDS_AFTR_SCL_UP : 43 + TOTAL_WRKRS_FDS_B4_SCL_UP : 13 + FRNTEND_MEM : 800000000 #800MB + TOTAL_WRKRS_MEM_AFTR_SCL_UP : 430000000 #430MB + TOTAL_WRKRS_MEM_B4_SCL_UP : 12000000 #120MB \ No newline at end of file diff --git a/tests/performance/tests/scale_up_workers/environments/xlarge.yaml b/tests/performance/tests/scale_up_workers/environments/macos_xlarge.yaml similarity index 100% rename from tests/performance/tests/scale_up_workers/environments/xlarge.yaml rename to tests/performance/tests/scale_up_workers/environments/macos_xlarge.yaml diff --git a/tests/performance/tests/scale_up_workers/scale_up_workers.yaml b/tests/performance/tests/scale_up_workers/scale_up_workers.yaml index 125aff830..a973eca52 100644 --- a/tests/performance/tests/scale_up_workers/scale_up_workers.yaml +++ b/tests/performance/tests/scale_up_workers/scale_up_workers.yaml @@ -16,12 +16,14 @@ modules: services: - module: shellexec prepare: + - "ps aux | grep '[c]om.amazonaws.ml.mms.ModelServer' | awk '{print $2}' | xargs kill -9" - "multi-model-server --start > /dev/null 2>&1" - "sleep 20s" - "curl -s -X POST http://localhost:8081/models?url=https://s3.amazonaws.com/model-server/model_archive_1.0/squeezenet_v1.1.mar" - "curl -s -X PUT http://localhost:8081/models/squeezenet_v1.1?min_worker=1&synchronous=true" post-process: - "multi-model-server --stop > /dev/null 2>&1" + - "sleep 10" - module: server_local_monitoring ServerLocalClient: - interval: 1s