Skip to content

Instantly share code, notes, and snippets.

@mskf3000
Forked from ginokent/7requests_per_second.sh
Created January 24, 2024 13:10
Show Gist options
  • Save mskf3000/0ec24f1013b4cac52d34e5b66d17790a to your computer and use it in GitHub Desktop.
Save mskf3000/0ec24f1013b4cac52d34e5b66d17790a to your computer and use it in GitHub Desktop.
秒間7リクエスト送りたい
PARALLEL=7
TARGET=http://127.0.0.1:8080/
N=$(seq 1 ${PARALLEL:?}) && while :; do printf "${TARGET:?}\n%.s" ${N} | xargs -P"${PARALLEL:?}" -I{} curl -sS {} -o /dev/null -w "response_code:%{response_code}\ttime_total:%{time_total}\n"; done | tee /tmp/loadtest_$(date +%Y%m%d_%H%M%S).log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment