Returns an array whose values are the names of histograms defined
in Histograms.json.
Create and return a histogram. Parameters:
name | Unique histogram name |
expiration | Expiration version |
min | - Minimal bucket size |
max | - Maximum bucket size |
bucket_count | - number of buckets in the histogram. |
type | - HISTOGRAM_EXPONENTIAL, HISTOGRAM_LINEAR, HISTOGRAM_BOOLEAN or HISTOGRAM_COUNT The returned object has the following functions: add(int) - Adds an int value to the appropriate bucket snapshot() - Returns a snapshot of the histogram with the same data fields as in histogramSnapshots() clear() - Zeros out the histogram's buckets and sum |
Create a histogram using the current state of an existing histogram. The
existing histogram must be registered in TelemetryHistograms.h.
name | Unique histogram name |
existing_name | Existing histogram name The returned object has the same functions as a histogram returned from newHistogram. |
Same as newHistogram above, but for histograms registered in TelemetryHistograms.h.
id | - unique identifier from TelemetryHistograms.h |
Addon telemetry hooks */
Register a histogram for an addon. Throws an error if the
histogram name has been registered previously.
addon_id | - Unique ID of the addon |
name | - Unique histogram name |
min | - Minimal bucket size |
max | - Maximum bucket size |
bucket_count | - number of buckets in the histogram |
histogram_type | - HISTOGRAM_EXPONENTIAL, HISTOGRAM_LINEAR, HISTOGRAM_BOOLEAN or HISTOGRAM_COUNT |
Return a histogram previously registered via
registerAddonHistogram. Throws an error if the id/name combo has
not been registered via registerAddonHistogram.
The returned object has the same functions as a histogram returned
from newHistogram.
addon_id | - Unique ID of the addon |
name | - Registered histogram name |
Delete all histograms associated with the given addon id.
addon_id | - Unique ID of the addon |
Read data from the previous run. After the callback is called, the last
shutdown time is available in lastShutdownDuration and any late
writes in lateWrites.
Return the number of seconds since process start using monotonic
timestamps (unaffected by system clock changes).
@throws NS_ERROR_NOT_AVAILABLE if TimeStamp doesn’t have the data.
The amount of time, in milliseconds, that the last session took
to shutdown. Reads as 0 to indicate failure.
The number of failed profile lock attempts that have occurred prior to
successfully locking the profile
A number representing the highest number of concurrent threads
reached during this session.
Set this to false to disable gathering of telemetry statistics.
A flag indicating whether Telemetry can submit official results.
An object containing a snapshot from all of the currently
registered addon histograms.
{ addon-id1 : data1, … }
where data is an object whose properties are the names of the
addon’s histograms and whose corresponding values are as in
histogramSnapshots.
Get statistics of file IO reports, null, if not recorded.
The statistics are returned as an object whose propoerties are the names
of the files that have been accessed and whose corresponding values are
arrays of size three, representing startup, normal, and shutdown stages.
Each stage’s entry is either null or an array with the layout
[total_time, #creates, #reads, #writes, #fsyncs, #stats]
Histogram types:
HISTOGRAM_EXPONENTIAL - buckets increase exponentially
HISTOGRAM_LINEAR - buckets increase linearly
HISTOGRAM_BOOLEAN - For storing 0/1 values
HISTOGRAM_FLAG - For storing a single value; its count is always == 1.
HISTOGRAM_COUNT - For storing counter values without bucketing.