Navigation Timing

68 views
Skip to first unread message

Peter Phaal

unread,
Jun 25, 2012, 8:09:08 PM6/25/12
to sFlow
Metrics from the W3C Navigation Timing interface
(http://www.w3.org/TR/navigation-timing/) provides useful information
on performance of web pages as seen by the client (browser). The
browser isn't expected to support sFlow, typically this information
would be returned using javascript to make an HTTP request to a
logging server (e.g. http://yahoo.github.com/boomerang/doc/).
Generally timing data isn't collected from all clients - just a random
sample.

The log server could act as a proxy, generating sFlow records on
behalf of the browser by filling in the http_request structure
(http://sflow.org/sflow_http.txt) with information describing the
client and the page that was timed, and an additional
extended_nav_timing structure containing the detailed timing data.

/* Navigation Timing */
/* reference http://www.w3.org/TR/navigation-timing/ */
/* To allow times to fit into 32 bits, normalize so that smallest time
value is 1, times are expressed in milliseconds and 0 is used to indicate
that event is not fired, or not complete */
/* opaque = flow_data; enterprise = 0; format = 2208 */

struct extended_nav_timing {
unsigned int type; /* PerformanceNavigation */
unsigned int redirectCount;
unsigned int navigationStart; /* PerformanceTiming */
unsigned int unloadEventStart;
unsigned int unloadEventEnd;
unsigned int redirectStart;
unsigned int redirectEnd;
unsigned int fetchStart;
unsigned int domainLookupStart;
unsigned int domainLookupEnd;
unsigned int connectStart;
unsigned int connectEnd;
unsigned int secureConnectionStart;
unsigned int requestStart;
unsigned int responseStart;
unsigned int responseEnd;
unsigned int domLoading;
unsigned int domInteractive;
unsigned int domContentLoadedEventStart;
unsigned int domContentLoadedEventEnd;
unsigned int domComplete;
unsigned int loadEventStart;
unsigned int loadEventEnd;
}
Reply all
Reply to author
Forward
0 new messages