如何在 iPhone 中执行延迟测试
我想对我的 iPhone 应用程序中的不同 url 执行延迟测试,一种方法是对 url 发出异步请求,并根据控件到达 connectionDidFinish 委托的时间来测量持续时间,这是正确的方法吗或者 iPhone 中有一些替代方案可以测量延迟时间?
I would like to perform a latency test with respect to different urls in my iPhone app, an approach would be to make an async request for an url and measure the time duration based upon when the control reaches in connectionDidFinish delegate, is this the correct approach or some alternatives available in iPhone to measure latency time?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不确定你如何定义延迟。请参阅wiki 文章以获得一些说明。
我会分析响应时间来了解网络延迟,这在移动连接中非常有趣。我在我开发的应用程序之一中使用了这种方法:
限制带宽用于模拟器测试可能是非常有帮助。
I am not sure how you define latency. Look at the wiki article for some clarification.
I'd profile for the response time to get a picture of the network lag, very interesting in mobile connections. I am using this approach in one of the apps I've developed:
Throttling bandwidth for simulator testing could be very helpful.
将 Mac 的 Airport 共享到 iPhone(将其桥接到以太网)。然后在Mac上使用tcpdump捕获网络流量,使用Wireshark查看pcap,这将为您提供网络延迟的最佳视图。
Share your Mac's Airport to your iPhone (bridge it to Ethernet). Then use tcpdump on the Mac to capture the network traffic, using Wireshark to view the pcap, this will give you the best view of network latency.