mirror of
https://github.com/c-cube/tiny_httpd.git
synced 2025-12-07 11:45:36 -05:00
23 lines
296 B
Bash
Executable file
23 lines
296 B
Bash
Executable file
#!/bin/bash
|
|
|
|
SERVER=$1
|
|
PORT=8088
|
|
"$SERVER" . -p $PORT &
|
|
PID=$!
|
|
|
|
url=http://localhost:${PORT}/foo_50
|
|
nb=$2
|
|
sleep_time=0
|
|
|
|
for (( c=1; c<=$nb; c++ )); do
|
|
f=$(mktemp)
|
|
(curl -s $url > $f; stat -c %s $f; rm $f) &
|
|
PIDS[$c]=$!
|
|
|
|
sleep $sleep_time
|
|
done
|
|
|
|
#echo ${PIDS[@]}
|
|
wait ${PIDS[@]}
|
|
|
|
kill $PID
|