contentTracing → tracing → content-tracing

This commit is contained in:
Jessica Lord 2015-08-28 10:57:20 -07:00
parent bbf2cbb6f6
commit aa03fddb62

View file

@ -1,4 +1,4 @@
# content-tracing
# contentTracing
The `content-tracing` module is used to collect tracing data generated by the
underlying Chromium content module. This module does not include a web interface
@ -6,7 +6,7 @@ so you need to open `chrome://tracing/` in a Chrome browser and load the
generated file to view the result.
```javascript
var tracing = require('content-tracing');
var contentTracing = require('content-tracing');
tracing.startRecording('*', tracing.DEFAULT_OPTIONS, function() {
console.log('Tracing started');
@ -23,7 +23,7 @@ tracing.startRecording('*', tracing.DEFAULT_OPTIONS, function() {
The `content-tracing` module has the following methods:
### `tracing.getCategories(callback)`
### `contentTracing.getCategories(callback)`
* `callback` Function
@ -33,7 +33,7 @@ are reached.
Once all child processes have acknowledged the `getCategories` request the
`callback` is invoked with an array of category groups.
### `tracing.startRecording(categoryFilter, traceOptions, callback)`
### `contentTracing.startRecording(categoryFilter, traceOptions, callback)`
* `categoryFilter` String
* `traceOptions` String
@ -74,7 +74,7 @@ The trace option will first be reset to the default option (`record_mode` set to
`record-until-full`, `enable_sampling` and `enable_systrace` set to `false`)
before options parsed from `traceOptions` are applied on it.
### `tracing.stopRecording(resultFilePath, callback)`
### `contentTracing.stopRecording(resultFilePath, callback)`
* `resultFilePath` String
* `callback` Function
@ -94,7 +94,7 @@ Trace data will be written into `resultFilePath` if it is not empty or into a
temporary file. The actual file path will be passed to `callback` if it's not
`null`.
### `tracing.startMonitoring(categoryFilter, traceOptions, callback)`
### `contentTracing.startMonitoring(categoryFilter, traceOptions, callback)`
* `categoryFilter` String
* `traceOptions` String
@ -108,7 +108,7 @@ soon as they receive the `startMonitoring` request.
Once all child processes have acknowledged the `startMonitoring` request the
`callback` will be called.
### `tracing.stopMonitoring(callback)`
### `contentTracing.stopMonitoring(callback)`
* `callback` Function
@ -117,7 +117,7 @@ Stop monitoring on all processes.
Once all child processes have acknowledged the `stopMonitoring` request the
`callback` is called.
### `tracing.captureMonitoringSnapshot(resultFilePath, callback)`
### `contentTracing.captureMonitoringSnapshot(resultFilePath, callback)`
* `resultFilePath` String
* `callback` Function
@ -134,7 +134,7 @@ Once all child processes have acknowledged the `captureMonitoringSnapshot`
request the `callback` will be called with a file that contains the traced data.
### `tracing.getTraceBufferUsage(callback)`
### `contentTracing.getTraceBufferUsage(callback)`
* `callback` Function
@ -142,7 +142,7 @@ Get the maximum usage across processes of trace buffer as a percentage of the
full state. When the TraceBufferUsage value is determined the `callback` is
called.
### `tracing.setWatchEvent(categoryName, eventName, callback)`
### `contentTracing.setWatchEvent(categoryName, eventName, callback)`
* `categoryName` String
* `eventName` String
@ -151,7 +151,7 @@ called.
`callback` will will be called every time the given event occurs on any
process.
### `tracing.cancelWatchEvent()`
### `contentTracing.cancelWatchEvent()`
Cancel the watch event. This may lead to a race condition with the watch event
callback if tracing is enabled.