Changes

Jump to: navigation, search

Browser Metrics:Data Collectors

2,671 bytes added, 00:14, 22 February 2006
document xml format for window and load events
===Overview===
Data will be collected as a stream of events, with the exception of a user profile that is collected once every browser session. Each event type is represented by a particular XML element in the <tt>http://www.mozilla.org/metrics</tt> namespace. We will define several event types that will have predefined schemas. Having these schemas will allow us to leave out the label for each piece of data in the event, compacting the amount of data that we send to the server. We will be able to throttle data collection based on the event type, so that verbose events can be turned on and off when we want. The tentative event types and associated schemas are listed below. (Note: the list is still very much in flux and will likely change.) All event types have a <tt>time</tt> attribute, which gives a timestamp for the event, recorded as seconds since the epoch.
===Profile===
* default search engine
* non-default values for built-in prefs
 
===Window Events===
 
Window events log various actions pertaining to DOM Windows, which provide a context for load events.
 
Common Window Event attributes:
 
<tt>window = [integer window id]</tt>
 
The id of the affected window. Ids are assigned starting from 0 and are never reused during that session. The window id is not unique across sessions.
 
====Window Create Event====
 
Records the creation of a new toplevel or child DOM Window.
 
Element name: <tt>windowcreate</tt>
 
Event-specific attributes:
 
<tt>parent = [integer window id]</tt> (optional)
 
The id of the parent of the newly created window, if present.
 
<tt>chrome = [boolean]</tt> (optional)
 
Whether the new window has chrome privileges. Defaults to false.
 
====Window Open Event====
 
Records the opening of a toplevel DOM Window.
 
Element name: <tt>windowopen</tt>
 
Event-specific attributes:
 
<tt>opener = [integer window id]</tt> (optional)
 
The id of the opener DOM window, if present.
 
====Window Close Event====
 
Records the closing of a toplevel DOM Window.
 
Element name: <tt>windowclose</tt>
 
Event-specific attributes: none
 
====Window Destroy Event====
 
Records the destruction of a toplevel or child DOM Window.
 
Element name: <tt>windowdestroy</tt>
 
Event-specific attributes: none
 
===Load Event===
Load events record a document being loaded into a DOM Window. Element name: <tt>load</tt> Attributes:<tt>window = [integer window id]</tt> The id of the window where the document was loaded. <tt>origin = [string]</tt> (optional) The action which initiated the load. Possible values include:* <tt>typed</tt>: The document URI was typed (or pasted) by the user.* <tt>link</tt>: The user followed a link to the document URI.* type = [<tt>session-history</tt>: The user used back/forward navigation to load the document.* <tt>reload</tt>: The user used the reload button or keyboard shortcut to reload the document.* <tt>global-history</tt>: The user loaded the page by selecting it from their global history.* <tt>bookmark</tt>: The user loaded the page by selecting it from the bookmarks menu, typed, bookmarkbookmarks toolbar, or bookmarks management UI.* <tt>script</tt>: A scriptexecuting on a page loaded the document.* <tt>refresh</tt>: A meta-refresh loaded the document..]* target <tt>external</tt>: The document URI was passed in from an external application. <tt>loadtime = [currentmilliseconds]</tt> The time from the initiation of the load until the document is complete (which includes all images, new windowstylesheet, new tabetc) in milliseconds<tt>bfCacheHit = [boolean]</tt> (optional) Whether the document presentation was loaded from the session history cache. If not specified, assumed to be false.]* load timeTodo / possible todo items:
* cache size before/after load
* content viewer size estimate
53
edits

Navigation menu