如何计算网站的响应时间? [英] How to calculate response time of the website?

查看:605
本文介绍了如何计算网站的响应时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个由4个模块组成的Web负载测试工具.第一个模块是计算网站的响应时间.因此,我需要您在此模块中提供帮助.

I am developing a web load testing tool which consist of 4 modules.The first module is to calculate response time of the website. so i need your help in this module.

推荐答案

您可以通过几种方法进行测试,最好的方法是在有意负载的情况下进行往返. 编写一个可以测试API并在请求中触发的简单客户端,看看它们花费多长时间=往返.
在服务器上记录何时接收到请求以及何时发送响应=服务时间.

当您拥有客户端时,同时运行多个客户端将模拟负载;尝试1、10、100.
您需要执行多个请求以确保获得良好的平均时间,我建议每次测试每个客户端发送100条消息.

现在您有了电话,查看往返时间和服务时间,看看它们如何变化.
You can test this several ways, the best though would be round trips with intentional load.
Write a simple client that can test the API and have it fire in requests, seeing how long they take = round trip.
On the server record when a request is received and when the response is sent = service time.

When you have your client, running several concurrently will simulate load; try 1, 10, 100.
You''ll need to do several requests to make sure you get a good average time, I would suggest sending 100 messages per client per test.

Now you have your numbers, look at the round trip and service times and see how they change.


这篇关于如何计算网站的响应时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆