tracing: fix api and docs
This commit is contained in:
parent
6b65a66119
commit
3b05b135a5
3 changed files with 50 additions and 18 deletions
|
@ -28,10 +28,10 @@ are reached.
|
|||
Once all child processes have acked to the `getCategories` request, `callback`
|
||||
is invoked with an array of category groups.
|
||||
|
||||
## tracing.startRecording(categoryFilter, options, callback)
|
||||
## tracing.startRecording(categoryFilter, traceOptions, callback)
|
||||
|
||||
* `categoryFilter` String
|
||||
* `options` Integer
|
||||
* `traceOptions` String
|
||||
* `callback` Function
|
||||
|
||||
Start recording on all processes.
|
||||
|
@ -51,9 +51,23 @@ Examples:
|
|||
* `test_MyTest*,test_OtherStuff`,
|
||||
* `"-excluded_category1,-excluded_category2`
|
||||
|
||||
`options` controls what kind of tracing is enabled, it could be a OR-ed
|
||||
combination of `tracing.DEFAULT_OPTIONS`, `tracing.ENABLE_SYSTRACE`,
|
||||
`tracing.ENABLE_SAMPLING` and `tracing.RECORD_CONTINUOUSLY`.
|
||||
`traceOptions` controls what kind of tracing is enabled, it is a comma-delimited list.
|
||||
Possible options are:
|
||||
|
||||
* `record-until-full`
|
||||
* `record-continuously`
|
||||
* `trace-to-console`
|
||||
* `enable-sampling`
|
||||
* `enable-systrace`
|
||||
|
||||
The first 3 options are trace recoding modes and hence mutually exclusive.
|
||||
If more than one trace recording modes appear in the `traceOptions` string,
|
||||
the last one takes precedence. If none of the trace recording mode is specified,
|
||||
recording mode is `record-until-full`.
|
||||
|
||||
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)
|
||||
|
||||
|
@ -75,10 +89,10 @@ 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, options, callback)
|
||||
## tracing.startMonitoring(categoryFilter, traceOptions, callback)
|
||||
|
||||
* `categoryFilter` String
|
||||
* `options` Integer
|
||||
* `traceOptions` String
|
||||
* `callback` Function
|
||||
|
||||
Start monitoring on all processes.
|
||||
|
@ -107,7 +121,7 @@ Get the current monitoring traced data.
|
|||
|
||||
Child processes typically are caching trace data and only rarely flush and send
|
||||
trace data back to the main process. That is because it may be an expensive
|
||||
operation to send the trace data over IPC, and we would like to avoid unneeded
|
||||
operation to send the trace data over IPC, and we would like to avoid unneeded
|
||||
runtime overhead of tracing. So, to end tracing, we must asynchronously ask all
|
||||
child processes to flush any pending trace data.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue