Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions
nsIMetricsService Interface Reference

import "nsIMetricsService.idl";

Inheritance diagram for nsIMetricsService:
Inheritance graph
[legend]
Collaboration diagram for nsIMetricsService:
Collaboration graph
[legend]

List of all members.

Public Member Functions

nsIMetricsEventItem createEventItem (in DOMString itemNamespace, in DOMString itemName)
 Creates a new EventItem object to hold event data.
void logEvent (in nsIMetricsEventItem item)
 Logs an event using the given EventItem.
void logSimpleEvent (in DOMString eventNS, in DOMString event, in nsIPropertyBag eventValues)
 Constructs and logs an EventItem, using the given namespace, event name, and event properties.
void flush ()
 Flush data to disk.
void upload ()
 Initiate the upload of the current event log.
void suspend ()
 Suspend log collection.
void resume ()
 Resume log collection.
unsigned long getWindowID (in nsIDOMWindow window)
 Gets a numeric window id corresponding to the given DOMWindow.

Detailed Description

Definition at line 134 of file nsIMetricsService.idl.


Member Function Documentation

nsIMetricsEventItem nsIMetricsService::createEventItem ( in DOMString  itemNamespace,
in DOMString  itemName 
)

Creates a new EventItem object to hold event data.

The event will not be logged until logEvent() is called.

Parameters:
itemNamespaceThe new item's namespace
itemNameThe new item's name
Returns:
a new MetricsEventItem instance

Flush data to disk.

Gets a numeric window id corresponding to the given DOMWindow.

The id remains constant for as long as the window exists.

Logs an event using the given EventItem.

The event is recorded with a timestamp generated at the time at which this method is called, and a session id for this instance of the application. The keys "time" and "sessionid" are reserved for this data.

Parameters:
itemThe item to log. This item and its entire tree of child items will be logged as part of the event.
void nsIMetricsService::logSimpleEvent ( in DOMString  eventNS,
in DOMString  event,
in nsIPropertyBag  eventValues 
)

Constructs and logs an EventItem, using the given namespace, event name, and event properties.

This is a more convenient version of logEvent() for the case where there are no child EventItems.

See also:
nsIMetricsEventItem

Resume log collection.

Call this method once per call to suspend to re-enable log collection.

Suspend log collection.

LogEvent calls will be silently ignored while log collection is suspended. For each call to suspend, resume must be called to re-enable log collection.

Initiate the upload of the current event log.

This causes the current event log to be truncated once the upload completes.


The documentation for this interface was generated from the following file: