Tsung?MySQL????????????????????
???????????? ???????[ 2013/10/24 10:38:55 ] ????????
???????MySQL???????????????? ??
????????: Linux RHEL 5U4 X86-64?? 24G??棬 16??.
????MySQL????????10.232.36.100???
??????????32??????????????????????update?? insert?? delete??????????????50%?? 30%?? 20%?? ?????????999999 × 100?Σ??100?β????????1-3??
??????????????????2??С???
??????????????tsung??????????? ???????blog??????? ??????
??????????????????? ???????????????????????滻????????????д???????к????????塣
???????????Σ?
<!DOCTYPE tsung SYSTEM "/usr/local/share/tsung/tsung-1.0.dtd">
<tsung loglevel="warning" dumptraffic="false">
<clients>
<client host="localhost" use_controller_vm="true"/>
</clients>
<servers>
<server host="10.232.36.100" port="3306" type="tcp"/>
</servers>
<load>
<arrivalphase phase="1" duration="2" unit="hour">
<users interarrival="0.1" unit="second" maxnumber="32"></users>
</arrivalphase>
</load>
<sessions>
<session probability="50" name="st-replace" type="ts_mysql">
<request>
<mysql type="connect" />
</request>
<request>
<mysql type="authenticate" database="test" username="test" password="mysqltest" />
</request>
<for from="1" to="999999" var="counter">
<for from="1" to="100" var="counter">
<setdynvars sourcetype="random_number" start="1" end="999999999">
<var name="rnd_uid" />
</setdynvars>
<setdynvars sourcetype="random_string" length="13">
<var name="rnd_uname" />
</setdynvars>
<setdynvars sourcetype="random_number" start="0" end="1">
<var name="rnd_male" />
</setdynvars>
<setdynvars sourcetype="random_number" start="1" end="120">
<var name="rnd_age" />
</setdynvars>
<setdynvars sourcetype="random_string" length="10">
<var name="rnd_city" />
</setdynvars>
<setdynvars sourcetype="random_string" length="52">
<var name="rnd_profile" />
</setdynvars>
<request subst="true">
<mysql type="sql">replace into user(tid?? uname?? male?? age?? city?? profile) values(%%_rnd_uid%%?? "%%_rnd_uname%%"?? %%_rnd_male%%?? %%_rnd_age%%?? "%%_rnd_city%%"?? "%%_rnd_profile%%") </mysql>
</request>
</for>
<thinktime min="2" max="5" random="true" />
</for>
<request>
<mysql type="close"></mysql>
</request>
</session>
<session probability="20" name="st-delete" type="ts_mysql">
<request>
<mysql type="connect" />
</request>
<request>
<mysql type="authenticate" database="test" username="test" password="mysqltest" />
</request>
<for from="1" to="999999" var="counter">
<for from="1" to="100" var="counter">
<setdynvars sourcetype="random_number" start="1" end="999999999">
<var name="rnd_uid" />
</setdynvars>
<request subst="true">
<mysql type="sql">delete from user where tid = %%_rnd_uid%% </mysql>
</request>
</for>
<thinktime min="2" max="5" random="true" />
</for>
<request>
<mysql type="close"></mysql>
</request>
</session>
<session probability="30" name="st-update" type="ts_mysql">
<request>
<mysql type="connect" />
</request>
<request>
<mysql type="authenticate" database="test" username="test" password="mysqltest" />
</request>
<for from="1" to="999999" var="counter">
<for from="1" to="100" var="counter">
<setdynvars sourcetype="random_number" start="1" end="999999999">
<var name="rnd_uid" />
</setdynvars>
<setdynvars sourcetype="random_string" length="52">
<var name="rnd_profile" />
</setdynvars>
<request subst="true">
<mysql type="sql">update user set profile = "%%_rnd_profile%%" where tid = %%_rnd_uid%% </mysql>
</request>
</for>
<thinktime min="2" max="5" random="true" />
</for>
<request>
<mysql type="close"></mysql>
</request>
</session>
</sessions>
</tsung>
??????????!
??????
???·???
??????????????????
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