Details
-
Suggestion
-
Resolution: Unresolved
-
P2: Important
-
5.0.0
-
None
-
All
Description
The new Navigation Timing W3C specification provides a framework for measuring browser performance by breaking down the time taken to look-up a DNS record, connect via TCP to a remove server, transfer HTTP data and so forth. See this image for the events that could be timed.
http://www.w3.org/TR/navigation-timing/timing-overview.png
A few enhancements in QtNetwork are needed to make this level of measurement possible in an application: the equivalents of domainLookupStart, domainLookupEnd, connectStart, connectEnd.
One possible way to implement the above (per Thiago's suggestion on #qt-labs) would be to "add a stateChanged signal to QNetworkReply and include the states in an enum. Hint: do NOT make the states in the enum sequential. Be very clear that there's more than one sequence possible."
Note: I am presuming that an application doesn't need enhancements to QtNetwork for the other events listed in the above diagram, as QtWebKit or the QNAM::createRequest() override should be able to handle that. But, I am open to being corrected here.
Also, it's not important to cover all possible states in a QtNetworkReply (there can be dozens!), but only the high-level ones deemed worth of performance instrumentation. Perhaps the stateChanged signal should supply the Unix time (ms since epoch) as the argument?