请教关于mysql数据库的压力测试方案

kainphil 2003-10-09 10:51:36
大型网站都是动态的,后台都有数据库。
针对这一特点,那么测试数据库在一定压力下的连接性能就相对更有意义了。
不知道大家对数据库的压力测试有什么好方法?
有什么好的测试软件?
...全文
79 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
kainphil 2003-10-17
  • 打赏
  • 举报
回复
thanks for your answer
sandyde2 2003-10-13
  • 打赏
  • 举报
回复
as nobody else answered, i try it somehow :)

write a script to simulate 300 users the same time searching process.

in serverside php file define start time and final time in the beginning and end. in serverside create a table(log) in db to record the duration.(id,user-ip,duration)

in client side, write a script to loop browsering the server php file. the test case should be the most heavy function of searching.

finally check the log table and evaluate it. 300 people the same time online searching should be enough for 50k users' scale site.

your topic is pretty interesting.. ding ding..

with best wishes

sandy
sandyde2 2003-10-13
  • 打赏
  • 举报
回复
on the base of last msg, i get some more ideas..

in the client side, the test script could be written in html + javascript. i.e. a form includes all hidden variables including valid values towards to your search function. once submit the form, in javascript write a loop submiting the form for 300 times..
<html>
<head>
<script>
function isValid(x)
{
var submit_string = compose_the_string_to_post(x);
for(var i=0; i<300; i++)
{
x.submit(); //not sure of the syntax :(
}
}
</script>
</head>
<body>
<form method=post action="your_remote_serach_engine_ interface" onsubmit=isValid(this)>
<input type=hidden name=city values="city">
<input type=hidden name=country values="country">
...
..
.
<input type=submit name=s1>
</form>

</body>
</html>

i have no idea whether php can do a graphical presentation.. in the server side we could at least write a java 2D application.

wait for better solution..



weizhihui1213 2003-10-13
  • 打赏
  • 举报
回复
学习

56,687

社区成员

发帖
与我相关
我的任务
社区描述
MySQL相关内容讨论专区
社区管理员
  • MySQL
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧