Selaa lähdekoodia

added stress test

tags/v0.4
Brice Figureau 18 vuotta sitten
vanhempi
commit
ba428437fc
4 muutettua tiedostoa jossa 50 lisäystä ja 20 poistoa
  1. 4
    20
      prj/project.tmproj
  2. BIN
      test/100
  3. 8
    0
      test/client.sh
  4. 38
    0
      test/stress.sh

+ 4
- 20
prj/project.tmproj Näytä tiedosto

@@ -3,7 +3,7 @@
3 3
 <plist version="1.0">
4 4
 <dict>
5 5
 	<key>currentDocument</key>
6
-	<string>../../nginx-0.6.30/src/os/unix/ngx_atomic.h</string>
6
+	<string>../ngx_http_uploadprogress_module.c</string>
7 7
 	<key>documents</key>
8 8
 	<array>
9 9
 		<dict>
@@ -530,30 +530,14 @@
530 530
 			<key>caret</key>
531 531
 			<dict>
532 532
 				<key>column</key>
533
-				<integer>18</integer>
533
+				<integer>4</integer>
534 534
 				<key>line</key>
535
-				<integer>825</integer>
535
+				<integer>282</integer>
536 536
 			</dict>
537
-			<key>columnSelection</key>
538
-			<false/>
539 537
 			<key>firstVisibleColumn</key>
540 538
 			<integer>0</integer>
541 539
 			<key>firstVisibleLine</key>
542
-			<integer>806</integer>
543
-			<key>selectFrom</key>
544
-			<dict>
545
-				<key>column</key>
546
-				<integer>4</integer>
547
-				<key>line</key>
548
-				<integer>825</integer>
549
-			</dict>
550
-			<key>selectTo</key>
551
-			<dict>
552
-				<key>column</key>
553
-				<integer>18</integer>
554
-				<key>line</key>
555
-				<integer>825</integer>
556
-			</dict>
540
+			<integer>258</integer>
557 541
 		</dict>
558 542
 	</dict>
559 543
 	<key>openDocuments</key>

BIN
test/100 Näytä tiedosto


+ 8
- 0
test/client.sh Näytä tiedosto

@@ -0,0 +1,8 @@
1
+#!/bin/sh
2
+
3
+cont=""
4
+while [ "$cont" != "new Object({ 'state' : 'done' })" ]
5
+do
6
+	cont=`curl -s -H "x-progress-id: $1" http://172.16.10.67/progress | sed -e 's/[\n\r]//'`
7
+	echo "[$1] '$cont'"
8
+done

+ 38
- 0
test/stress.sh Näytä tiedosto

@@ -0,0 +1,38 @@
1
+#!/bin/sh
2
+i=0
3
+LIMIT="10k"
4
+FILE="100"
5
+#trap 'kill_all' SIGINT SIGTERM
6
+
7
+while [ "1" == "1" ]
8
+do
9
+for j in $(seq 5)
10
+do
11
+i=`expr $i + 1`
12
+echo "Upload $i"
13
+curl --limit-rate $LIMIT -F pouet=@$FILE http://172.16.10.67/upload.html?X-Progress-ID=$i &
14
+sh client.sh $i &
15
+i=`expr $i + 1`
16
+echo "Upload $i"
17
+curl --limit-rate $LIMIT -F pouet=@$FILE http://172.16.10.67/upload.html?X-Progress-ID=$i &
18
+sh client.sh $i &
19
+i=`expr $i + 1`
20
+echo "Upload $i"
21
+curl --limit-rate $LIMIT -F pouet=@$FILE http://172.16.10.67/upload.html?X-Progress-ID=$i &
22
+sh client.sh $i &
23
+i=`expr $i + 1`
24
+echo "Upload $i"
25
+curl --limit-rate $LIMIT -F pouet=@$FILE http://172.16.10.67/upload.html?X-Progress-ID=$i &
26
+sh client.sh $i &
27
+i=`expr $i + 1`
28
+echo "Upload $i"
29
+curl --limit-rate $LIMIT -F pouet=@$FILE http://172.16.10.67/upload.html?X-Progress-ID=$i &
30
+sh client.sh $i &
31
+i=`expr $i + 1`
32
+echo "Upload $i"
33
+curl --limit-rate $LIMIT -F pouet=@$FILE http://172.16.10.67/upload.html?X-Progress-ID=$i &
34
+sh client.sh $i &
35
+done
36
+
37
+wait
38
+done

Loading…
Peruuta
Tallenna