如何在android中使用KSOAP调用SOAP Web服务时获取往返时间?
我正在开发一个依赖 .NET Web 服务获取动态数据的 Android 应用程序。因此,为了与 SOAP Web 方法进行通信,我使用 KSOAP2 第三方 API。它运行良好。但我需要使用 KSOAP2 获取每个 Web 服务调用的往返时间,因为与 iPhone 中运行的相同应用程序相比,我的应用程序运行缓慢。所以我需要知道 RTT 来提高 Android 应用程序的性能。
I am developing an Android application which rely on .NET web service for dynamic data. So, to communicate with SOAP web methods i am using KSOAP2 third party API. It is working fine. but i need to get the round trip time for each web service call using KSOAP2 because my application running slow when compared with same application running in iPhone. So I need to know the RTT to improve the performance of my Android application.
您可以围绕基本时间测量技术对 .NET 服务进行调用,并将响应时间添加到日志中以供以后检查。像这样的东西...
You could wrap the call to .NET service around basic time measuring technique and add the response time in logs for later inspection. Something like this...