计算不同站点的响应时间 [英] calculating the response time of different sites

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

问题描述

您好,

我需要从我的应用程序中找到几个站点列表,找到这些站点的响应时间并对它们进行排序(首先打开它们将会在最佳)。我使用java(服务器端)做了同样的事情。现在我的要求是在客户端(可能是AJAX)。我有两个挑战。下面是我到目前为止所做的,

Hi there,

I need to hit few list of sites from my application and find the response time of those site and sort them (which ever is opening first will sit at the top). I have done the same using java (server side). Now my requirement is do in the client side (AJAX possibly). I?m having two challenges. Below is what I have done so far,

展开 | 选择 | Wrap | 行号

推荐答案

如果你''我已经在服务器端使用Java解决了这个问题,调用该脚本而不是传递URL,响应应该是响应时间。从那里,你可以对列表进行排序。
If you''ve already solved this with Java on the server-side, call that script instead passing the URL and the response should be the response time. From that, you can sort the list.


你好,

Hi acoder,


如果你已经解决了这与服务器端的Java一样,调用该脚本而不是传递URL和响应应该是响应时间。从那里,您可以对列表进行排序。
If you''ve already solved this with Java on the server-side, call that script instead passing the URL and the response should be the response time. From that, you can sort the list.



:)......问题是,我想在这方面完成客户端的外包。这绝不是java类的关注/工作。因此,不允许使用java和servlet ...


原因是,调用java / servlet类需要花费时间,必须避免。

我的意思是,如果我们使用Ajax,可以避免jsp-> java-> jsp循环之间的时间。这可能是有效的我相信(我的意思是,在客户端做)。


fREDDIE

:)... The thing is, I want to finish off everthing in the client side in this regards. This must no way be a concern/workof for a java class. So no java and servlet stuffs are allowed...

The reason is, calling a java/servlet class will take time which must be avoided.
I mean, the time between the jsp->java->jsp cycle can be avoided if we use Ajax. This could be effective i believe (i mean, doing on the client side).

fREDDIE


我不是说不使用阿贾克斯。我建议你通过Ajax / XmlHttp调用JSP页面。
I''m not saying not to use Ajax. What I suggested was that you call the JSP page via Ajax/XmlHttp.


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

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