im interested in retrieving the following performance metrics for a http connection in android
- time taken for each task : DNS
lookup, establish conneciton,
download response etc
- total download times.
- number of tcp connections made
- amount of data downloaded
- number of page requests and page responses
- ajax requests
- request type (GET/PUT/POST, etc.)
- error responses
Unfortunately I did not find much APIs providing such information. Though there is one interface HttpConnectionMetrics which provides me some of the required information like amount of data downloaded etc. it seems to have a generic method getMetric(), but there are no pointers on internet on what information can be extracted with this method. Any help here would be highly appreciated..
I figured out another way to retrieve this information : install tcpdump on android phone, configure is properly. try reading and parsing the tcp packets information dumped by tcpdump. but this method would be extremely CPU intensive and can lead to performance issues. Also phone should be rooted to install tcpdump.
is there any other way?? Any help here would be highly appreciated.