Spaces:
Sleeping
Sleeping
File size: 626 Bytes
52f4870 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | #!/usr/bin/env bash
set -euo pipefail
BASE_URL="${1:-http://127.0.0.1:7860}"
TASK_ID="${2:-bug_detection_easy_1}"
for path in / /health /tasks /score /diagnostics; do
code=$(curl -s -o /tmp/load_test_out.json -w '%{http_code}' "$BASE_URL$path")
echo "$path -> $code"
done
curl -s -X POST "$BASE_URL/reset" -H 'content-type: application/json' -d "{\"task_id\":\"$TASK_ID\"}" >/tmp/load_test_reset.json
curl -s -X POST "$BASE_URL/step" -H 'content-type: application/json' -d '{"action":{"action_type":"approve","comments":[],"suggestions":[],"final_decision":"approved"}}' >/tmp/load_test_step.json
echo "load_test: ok"
|