Newer
Older
#!/usr/bin/env bash
set -o errexit -o nounset
function usage {
echo "Usage: load_test [test_count]
This script load tests the workspaces capability service by creating and submitting
the specified number of null requests to the system under testing.
Running this on the production system is not recommended.
"
}
test_count=$1
CAPABILITY_SERVICE=$(capo -q edu.nrao.workspaces.CapabilitySettings.externalServiceUrl)
parameters="{\"arguments\": \"-g\"}"
for i in $(seq "$test_count");do
curl --header "Content-Type: application/json" --request POST --data "$parameters" "$CAPABILITY_SERVICE"/capability/null/request/create-and-submit
done
echo "All $test_count requests submitted for Load Test.
Please use the active requests page or the database to monitor the progress of these requests."