作者:小王子loving | 来源:互联网 | 2023-05-16 22:31
IamwritingupathesisformywebdatabaseprojectandIjusthaveacoupleofquestionsonknowin
I am writing up a thesis for my web/database project and I just have a couple of questions on knowing which tool is best to use to measure web and database speed. I am using php/jquery/html/mysqli
我正在为我的网络/数据库项目写一篇论文,我只想知道哪种工具最适合用来衡量网络和数据库的速度。我正在使用php / jquery / html / mysqli
Question 1: Is it best to use Firebug to test how long each request takes in firefox? If so is it ideal to show a screenshot of every request which has taken place in a page or is it best to show all the requests at once. In other words do you want to see the full time of all the requests or each and every individual request.
问题1:最好使用Firebug来测试每个请求在firefox中占用多长时间?如果是这样,最好显示页面中发生的每个请求的屏幕截图,或者最好一次显示所有请求。换句话说,您是否希望查看所有请求或每个请求的全部时间。
Question 2: When testing database speed as I have a database in phpmyadmin, what is best tool to use in order to measure speed of database and what are you most interested in seeing when view speed of database. Is it how long it takes a query to run, or table to how up, inserting data? etc.
问题2:在测试数据库速度时,因为我在phpmyadmin中有一个数据库,为了测量数据库的速度以及在查看数据库查看速度时最感兴趣的内容,最好的工具是什么。是运行查询需要多长时间,还是表格插入数据?等等
Thank You
谢谢
3 个解决方案
2
To test your project you need to emulate different load volume and provide averaged values of response times.
要测试项目,您需要模拟不同的负载量并提供响应时间的平均值。
It would be best if you could generate enough load to reach failure point multiple times. It can be maximum allowed simultaneous database connections or anything similar that will case some requests to fail. That will be your maximum load.
如果您能够产生足够的负载以多次达到故障点,那将是最好的。它可以是允许的最大同时数据库连接或类似的任何会使某些请求失败的情况。那将是你的最大负荷。
For volumes between no and maximum you need to do breakpoints and test your system on them. For each breakpoint you need to generate thousands of tries so you could remove extremums and calculate average values.
对于no和maximum之间的卷,您需要执行断点并在其上测试系统。对于每个断点,您需要生成数千次尝试,以便删除极值并计算平均值。
For example, if your system starts encountering failures at 200 simultaneous requests, you can test it at 1, 25, 50, 100, 150 requests breakpoints. Also you need to pick the amount of tries for each breakpoint, let's say you'll pick 10000. Then you do 10000 lone requests, 10000 requests consisting of 25 simultaneous calls, then of 50 calls, etc.
例如,如果您的系统在200个并发请求中遇到故障,则可以在1,25,50,100,150个请求断点处对其进行测试。此外,您需要为每个断点选择尝试的数量,假设您选择10000.然后您执行10000个单独请求,10000个请求,包括25个同时呼叫,然后是50个呼叫等。
On top of that you will need different graphs to show the increase of reply time and your overall system behaviour. You then will need to explain why load times increase and provide ways to optimize both your software and hardware in order to make your system capable of dealing with bigger load.
最重要的是,您将需要不同的图表来显示回复时间和整体系统行为的增加。然后,您需要解释为什么加载时间会增加,并提供优化软件和硬件的方法,以使您的系统能够处理更大的负载。
Apart from simultaneous (parallel) requests, you might want to also consider testing on how your system will behave on different load of consecutive requests.
除了同时(并行)请求之外,您可能还需要考虑测试系统在不同负载的连续请求中的行为方式。
That's how it should look like in general. I'm sure there is software to do such kind of analysis, but you could write your own simple scripts that will generate load. In later case I'm sure that will be a big plus for your thesis if you will be able to provide enough data to show that your load generating software works properly.
这就是它一般的样子。我确信有软件可以进行这种分析,但你可以编写自己的简单脚本来产生负载。在后面的例子中,如果您能够提供足够的数据来证明您的负载生成软件正常工作,我相信这对您的论文来说将是一个很大的优势。