Siege????Web??????
???????????? ???????[ 2014/9/11 14:05:04 ] ??????????????? WEB????
????????????????url????????
?????μ? http://www.blogjava.net/crespochen/archive/2009/06/02/279573.html ?? http://baike.baidu.com/link?url=Uv0KtwM83hvFTjudQsP37FIfeUDJxMW4Kvodfk6oSTJ4B4ctpr1R6P4CGXdyMExyU7rGL2bold_aGJHwKaV2l_
????????????1.73?????????????/guodian/uap2????????Weblogic??Server-0????????7010????uap2??????uap_server?????http??????
???????
????http://192.168.1.73:7010/sguap-client/SmallCase/rest/smallCase/
?????????
????http://192.168.1.73:7010/sguap-client/SmallCase/rest/smallCase/insert?uuid=XXX&name=XXX
????????
????http://192.168.1.73:7010/sguap-client/SmallCase/rest/smallCase/update?uuid=XXX&name=XXX
???????
????http://192.168.1.73:7010/sguap-client/SmallCase/rest/smallCase/delete?uuid=XXX
??????????1.74?????????
????yum -y install siege #???siege??????????????????????URL??????siege????????
????????д???shell????url
#!/bin/bashfunction get_random_name(){MATRIX="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"LENGTH=8while[${n:=1}-le$LENGTH]; doPASS="$PASS${MATRIX:$(($RANDOM%${#MATRIX})):1}"let n+=1doneecho$PASS}function make_link(){act=$1#echo $actfor i in$seqc; do#echo $i
linkarr[$i]="$link/$act?uuid=${idarr[$i]}&name=$(get_random_name)"echo${linkarr[$i]}>>$outdone}num=$1out=$2[ x$num = x ]&&num=10[ x$out = x ]&&out=link.out
link=http://192.168.1.73:7010/sguap-client/SmallCase/rest/smallCase
declare-a idarr
seqc=`seq$num`for i in$seqc; do
idarr[$i]=$[$RANDOM%1000]doneecholink=$link>$outecho${idarr[@]}declare-a linkarr
$(make_link insert);
echo $link/>>$outecho>>$out
$(make_link update);
echo $link/>>$outecho>>$out
$(make_link delete);
echo $link/>>$outecho>>$out
????????????
????siege -c20 -r2 -f link.out
?????????????
????-c20 ????20?????
????-r2 ??????2??
????-f link.out ?????б??URL?б?
????????????
** SIEGE 3.0.0
** Preparing 20 concurrent users for battle.
The server is now under siege...
HTTP/1.1 200 0.37 secs: 340 bytes ==> GET /sguap-client/SmallCase/rest/smallCase/insert
HTTP/1.1 200 0.38 secs: 340 bytes ==> GET /sguap-client/SmallCase/rest/smallCase/insert
............................................... #????????HTTP/1.1 ...
Transactions: 40 hits
Availability: 100.00 %
Elapsed time: 2.14 secs
Data transferred: 0.01 MB
Response time: 0.21 secs
Transaction rate: 18.69 trans/sec
Throughput: 0.01 MB/sec
Concurrency: 3.87
Successful transactions: 40
Failed transactions: 0
Longest transaction: 0.58
Shortest transaction: 0.00
????Concurrency???????
????siege?????????Щ?????????bombardment??????????????????????????????????????
????bombardment link.out 5 5 10 1
?????????????Ч??????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11