Selenium (Java & Python) Client Algorithm to read "Performance Statistics" from Chrome Dev Tool

76 views
Skip to first unread message

Debanjan Bhattacharjee

unread,
Dec 25, 2017, 7:32:01 AM12/25/17
to Selenium Users
Hello Everyone,

Wish you all a Merry Christmas.

I was trying to get some "Performance Statistics" from "Chrome Development Tool" through both Selenium Java & Python Clients.

What I observed, that the entries within IDE Console Output are 


  1. Not in the same order
  2. Length of both the Output varies in length.

So my question is, 

  1. Is there a distinct Algorithm, which all the Selenium Clients follow while picking up the "Performance Statistics" parameters?
  2. Does different Selenium Client follows different Algorithm while picking up "Performance Statistics" parameters?
  3. If both the Selenium Client actually uses JavaScript why should the length vary?

Java Client Output :

[{redirectCount=0, encodedBodySize=218541, unloadEventEnd=0, responseEnd=2834.3800000000006, domainLookupEnd=1679.3400000000001, unloadEventStart=0, domContentLoadedEventStart=3062.82, type=navigate, decodedBodySize=218541, duration=7279.885, redirectStart=0, connectEnd=2219.0950000000003, toJSON={}, requestStart=2223.0450000000005, startTime=0, fetchStart=2702.4750000000004, domContentLoadedEventEnd=3072.8000000000006, entryType=navigation, workerStart=0, responseStart=2588.0200000000004, domInteractive=3062.775, domComplete=7271.39, domainLookupStart=1679.3400000000001, redirectEnd=0, transferSize=219089, connectStart=1679.3400000000001, loadEventStart=7272.015, secureConnectionStart=1779.905, name=http://www.google.com/, nextHopProtocol=..........

Python Client Output :

[{'connectEnd': 1506.0600000000002, 'connectStart': 1077.92, 'decodedBodySize': 218457, 'domComplete': 3273.585, 'domContentLoadedEventEnd': 2061.1000000000004, 'domContentLoadedEventStart': 2045.6950000000002, 'domInteractive': 2045.64, 'domainLookupEnd': 1077.92, 'domainLookupStart': 1077.92, 'duration': 3288.4300000000003, 'encodedBodySize': 218457, 'entryType': 'navigation', 'fetchStart': 1790.8600000000001, 'initiatorType': 'navigation', 'loadEventEnd': 3288.4300000000003, 'loadEventStart': 3274.57, 'name': 'http://www.google.com/', 'nextHopProtocol': 'h2', 

PS : I have trimmed the output till 'nextHopProtocol' as I understand here onwards the JavaScript and AJAX Calls comes into play.

Thanks and Regards
Dev

Mohan Radhakrishnan

unread,
Dec 27, 2017, 5:07:40 AM12/27/17
to Selenium Users

    Is this the Selenium API ?

Thanks,
Mohan

Debanjan Bhattacharjee

unread,
Jan 2, 2018, 6:14:18 AM1/2/18
to Selenium Users
Hi Mohan,

Thanks for the reply. Yes, I have used the "JavascriptExecutor" interface.

Thanks and Regards
Dev

Mohan Radhakrishnan

unread,
Jan 9, 2018, 7:33:55 AM1/9/18
to Selenium Users
Hi Debanjan,
                        How do use this ? It would to be interesting if one wants to code an API to do some statistical calculations for capacity planning.

Thanks,
Mohan

Debanjan Bhattacharjee

unread,
Jan 17, 2018, 6:00:09 AM1/17/18
to Selenium Users
Yes Mohan,

It's a Selenium API.

Thanks and Regards
DebanjanB


On Wednesday, December 27, 2017 at 3:37:40 PM UTC+5:30, Mohan Radhakrishnan wrote:

Debanjan Bhattacharjee

unread,
Jan 17, 2018, 6:01:35 AM1/17/18
to Selenium Users
Hi Mohan,

Yes, we do take help of this API for pulling out Performance Statistics.

Thanks and Regards
DebanjanB
Reply all
Reply to author
Forward
0 new messages