mirror of
https://github.com/c-cube/tiny_httpd.git
synced 2025-12-06 11:15:35 -05:00
foo_50 is now produces with /dev/random and added a small doc and diff in stress.sh
This commit is contained in:
parent
ce463b76b4
commit
bac91923ed
6 changed files with 12 additions and 9 deletions
|
|
@ -1,5 +1,5 @@
|
|||
serve directory . on http://127.0.0.1:8088
|
||||
0 0 52428800 data21
|
||||
0 0 52428800 data22
|
||||
0 0 52428800 data23
|
||||
0 0 157286400 total
|
||||
52428800 data21
|
||||
52428800 data22
|
||||
52428800 data23
|
||||
157286400 total
|
||||
|
|
|
|||
|
|
@ -20,4 +20,4 @@ curl -N "http://localhost:${PORT}/foo_50" -o data23 \
|
|||
-H 'Tranfer-encoding: chunked' --max-time 10
|
||||
|
||||
kill $PID
|
||||
wc data21 data22 data23
|
||||
wc -c data21 data22 data23
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
(targets foo_50)
|
||||
(enabled_if (= %{system} "linux"))
|
||||
(action
|
||||
(bash "dd if=/dev/zero of=%{targets} bs=1M count=50")))
|
||||
(bash "dd if=/dev/random of=%{targets} bs=1M count=50")))
|
||||
|
||||
(rule
|
||||
(targets upload-out)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
# usage: source stress.sh path/http_of_dir.exe nb
|
||||
# it will run np parallel curl to fetch file $url below
|
||||
|
||||
SERVER=$1
|
||||
nb=$2
|
||||
|
||||
|
|
@ -12,7 +15,7 @@ sleep_time=0
|
|||
|
||||
for (( c=1; c<=$nb; c++ )); do
|
||||
f=$(mktemp)
|
||||
(curl -s $url > $f; stat -c %s $f; rm $f) &
|
||||
(curl -s $url > $f; stat -c %s $f; diff foo_50 $f; rm $f) &
|
||||
PIDS[$c]=$!
|
||||
|
||||
sleep $sleep_time
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
serve directory . on http://127.0.0.1:8087
|
||||
upload successful 0 0 52428800 data
|
||||
upload successful52428800 data
|
||||
|
|
|
|||
|
|
@ -14,4 +14,4 @@ cat foo_50 | curl -N -X PUT http://localhost:$PORT/data --data-binary @- \
|
|||
-H 'Transfer-Encoding: chunked' --max-time 10
|
||||
|
||||
kill $PID
|
||||
wc data
|
||||
wc -c data
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue