HAR file connection field - need to resolve to TCP port

347 views
Skip to first unread message

les.m...@eperformancegroup.com

unread,
Apr 19, 2015, 1:27:41 AM4/19/15
to google-chrome-...@googlegroups.com
I am doing some performance work where I need to associate the requests in the HAR file coming from Chromium with the underlying network packet data.

Is there an API (using DevTools) or some other way I can determine the Tcp source ip/port and dest ip/port that is associated with each connection?

I am looking at this field in the HAR file:   "connection": "181486".   It uniquely identifies a TCP connection, but alas does not map to the underlying TCP port that was used.

In the chrome://net-internals/#events I can see that the SOCKET event has what I need.  Is there is a way to perhaps listen on these socket events via an extension then merge with the HAR file?  It looks like the event number matches the "connection" entry in the har file.

Would the Chromium team accept a code patch that would add the network information into the exported HAR file?

202234: SOCKET

abctvstore.cafepress.com:80

Start Time: 2015-04-18 16:05:33.404

t=26244 [st=    0] +SOCKET_ALIVE  [dt=18912+]
                    --> source_dependency = 202172 (CONNECT_JOB)
t=26244 [st=    0]   +TCP_CONNECT  [dt=28]
                      --> address_list = ["192.16.31.61:80"]
t=26244 [st=    0]      TCP_CONNECT_ATTEMPT  [dt=28]
                        --> address = "192.16.31.61:80"
t=26272 [st=   28]   -TCP_CONNECT
                      --> source_address = "192.168.0.11:10799"
t=26272 [st=   28]   +SOCKET_IN_USE  [dt=38]
                      --> source_dependency = 202169 (HTTP_STREAM_JOB)
t=26273 [st=   29]      SOCKET_BYTES_SENT
                        --> byte_count = 938
t=26307 [st=   63]      SOCKET_BYTES_RECEIVED
                        --> byte_count = 857
t=26310 [st=   66]   -SOCKET_IN_USE
t=26312 [st=   68]   +SOCKET_IN_USE  [dt=31]


Eugene Klyuchnikov

unread,
Apr 19, 2015, 3:10:35 AM4/19/15
to google-chrome-...@googlegroups.com
Hello.

 It is easy to add IP address to HAR as a "custom" field, because DevTools already has this information.
 Just file a crbug/

 The difference between connection and IP is that there could be multiple connections to the same IP:port.

Best regards,
  Eugene.


Eugene Klyuchnikov | SW Engineer | eus...@google.com | Fight fire with fire!

--
You received this message because you are subscribed to the Google Groups "Google Chrome Developer Tools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-develo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-chrome-developer-tools/cca809e2-bf29-43ba-93d2-1fd220eb8b50%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages