requeststats.js
No description.

File Location

/goog/labs/net/webchannel/requeststats.js

Classes

goog.labs.net.webChannel.requestStats.ServerReachabilityEvent
Event class for SERVER_REACHABILITY_EVENT.
goog.labs.net.webChannel.requestStats.TimingEvent
Event class for requestStats.Event.TIMING_EVENT

Public Protected Private

Enumerations

Global Functions

goog.labs.net.webChannel.requestStats.getStatEventTarget() goog.events.EventTarget
Returns the singleton event target for stat events.
Returns: goog.events.EventTarget  The event target for stat events.
code »
goog.labs.net.webChannel.requestStats.notifyServerReachabilityEvent(reachabilityType)
Notify the channel that a particular fine grained network event has occurred. Should be considered package-private.
Arguments:
reachabilityType : requestStats.ServerReachability
The reachability event type.
code »
goog.labs.net.webChannel.requestStats.notifyStatEvent(stat)
Helper function to call the stat event callback.
Arguments:
stat : requestStats.Stat
The stat.
code »
goog.labs.net.webChannel.requestStats.notifyTimingEvent(sizerttretries)
Helper function to notify listeners about POST request performance.
Arguments:
size : number
Number of characters in the POST data.
rtt : number
The amount of time from POST start to response.
retries : number
The number of times the POST had to be retried.
code »
goog.labs.net.webChannel.requestStats.onEndExecution()
Helper function to call the end hook
code »
goog.labs.net.webChannel.requestStats.onStartExecution()
Helper function to call the start hook
code »
goog.labs.net.webChannel.requestStats.setEndThreadExecutionHook(endHook)
Allows the application to set an execution hooks for when a channel stops processing requests. This is useful to track timing or logging special information. The function takes no parameters and return void.
Arguments:
endHook : Function
The function for the end hook.
code »
goog.labs.net.webChannel.requestStats.setStartThreadExecutionHook(startHook)
Allows the application to set an execution hooks for when a channel starts processing requests. This is useful to track timing or logging special information. The function takes no parameters and return void.
Arguments:
startHook : Function
The function for the start hook.
code »
goog.labs.net.webChannel.requestStats.setTimeout(fnms) number
Wrapper around SafeTimeout which calls the start and end execution hooks with a try...finally block.
Arguments:
fn : Function
The callback function.
ms : number
The time in MS for the timer.
Returns: number  The ID of the timer.
code »

Global Variables

SERVER_REACHABILITY_EVENT :
The type of event that occurs every time some information about how reachable the server is is discovered.
Code »
STAT_EVENT :
Stat Event that fires when things of interest happen that may be useful for applications to know about for stats or debugging purposes.
Code »
TIMING_EVENT :
An event that fires when POST requests complete successfully, indicating the size of the POST and the round trip time.
Code »

Directory webchannel

File Reference