Detailed response times with TrafficScript
In many situations, your traffic manager is the best place to gather this information, especially if it's pulling information from multiple sources for each request. This article shows how you can use
$start = sys.time.highres(); http.request.get( "http://example.com/" ); log.info( "Fetched example.com in " . ( sys.time.highres() - $start ) . " seconds" );
Since you can attach start times (or any other data) to connections using # Request rule connection.data.set( "start", string.sprintf( "%f", sys.time.highres() ) ); # Response rule $start = toDouble( connection.data.get( "start" ) ); if( ! $start ) break; connection.data.set( "responseTime", string.sprintf( "%f", sys.time.highres() - $start ) ); Because Of course, you don't have to put the time into the event log or the access log. You could $start = toDouble( connection.data.get( "start" ) ); if( ! $start ) break; http.setResponseHeader( "X-Response-Time", string.sprintf( "%f seconds", sys.time.highres() - $start ) ); You can see this in action from Firefox using the Live HTTP Headers extension. For detailed information about these and other functions, see the TrafficScript Manual.
Chris Boyle
[Zeus Dev Team] 19 December 2006
|
Recent Articles
Other Resources
|

Response time is an important metric for any service. According to recent research, users are 
