CDPotion.Domain.Tracing (cdpotion v0.1.4)
Summary
Types
Configuration for memory dump. Used only when 'memory-infra' category is enabled.
Details exposed when memory request explicitly declared. Keep consistent with memory_dump_request_args.h and memory_instrumentation.mojom
Compression type to use for traces returned via streams.
Data format of a trace. Can be either the legacy JSON format or the protocol buffer format. Note that the JSON format will be deprecated soon.
description not provided :(
Backend type to use for tracing. chrome
uses the Chrome-integrated
tracing service and is supported on all platforms. system
is only
supported on Chrome OS and uses the Perfetto system tracing service.
auto
chooses system
when the perfettoConfig provided to Tracing.start
specifies at least one non-Chrome data source; otherwise uses chrome
.
Functions
Stop trace events collection.
Gets supported tracing categories.
Record a clock sync marker in the trace.
Request a global memory dump.
Types
memory_dump_config()
@type memory_dump_config() :: map()
Configuration for memory dump. Used only when 'memory-infra' category is enabled.
memory_dump_level_of_detail()
@type memory_dump_level_of_detail() :: :background | :light | :detailed
Details exposed when memory request explicitly declared. Keep consistent with memory_dump_request_args.h and memory_instrumentation.mojom
stream_compression()
@type stream_compression() :: :none | :gzip
Compression type to use for traces returned via streams.
stream_format()
@type stream_format() :: :json | :proto
Data format of a trace. Can be either the legacy JSON format or the protocol buffer format. Note that the JSON format will be deprecated soon.
trace_config()
@type trace_config() :: %{ enableArgumentFilter: boolean() | nil, enableSampling: boolean() | nil, enableSystrace: boolean() | nil, excludedCategories: [String.t()] | nil, includedCategories: [String.t()] | nil, memoryDumpConfig: memory_dump_config() | nil, recordMode: :recordUntilFull | :recordContinuously | :recordAsMuchAsPossible | :echoToConsole | nil, syntheticDelays: [String.t()] | nil, traceBufferSizeInKb: number() | nil }
description not provided :(
tracing_backend()
@type tracing_backend() :: :auto | :chrome | :system
Backend type to use for tracing. chrome
uses the Chrome-integrated
tracing service and is supported on all platforms. system
is only
supported on Chrome OS and uses the Perfetto system tracing service.
auto
chooses system
when the perfettoConfig provided to Tracing.start
specifies at least one non-Chrome data source; otherwise uses chrome
.
Functions
end!()
Stop trace events collection.
get_categories()
Gets supported tracing categories.
record_clock_sync_marker(sync_id)
Record a clock sync marker in the trace.
Parameters:
- (Required)
sync_id
: The ID of this clock sync marker
request_memory_dump(deterministic \\ nil, level_of_detail \\ nil)
@spec request_memory_dump(boolean(), memory_dump_level_of_detail()) :: {String.t(), map()}
Request a global memory dump.
Parameters:
- (Optional)
deterministic
: Enables more deterministic results by forcing garbage collection - (Optional)
level_of_detail
: Specifies level of details in memory dump. Defaults to "detailed".
start(categories \\ nil, options \\ nil, buffer_usage_reporting_interval \\ nil, transfer_mode \\ nil, stream_format \\ nil, stream_compression \\ nil, trace_config \\ nil, perfetto_config \\ nil, tracing_backend \\ nil)
@spec start( String.t(), String.t(), number(), String.t(), stream_format(), stream_compression(), trace_config(), String.t(), tracing_backend() ) :: {String.t(), map()}
Start trace events collection.
Parameters:
- (Optional)
categories
: Category/tag filter - (Optional)
options
: Tracing options - (Optional)
buffer_usage_reporting_interval
: If set, the agent will issue bufferUsage events at this interval, specified in milliseconds - (Optional)
transfer_mode
: Whether to report trace events as series of dataCollected events or to save trace to a stream (defaults toReportEvents
). - (Optional)
stream_format
: Trace data format to use. This only applies when usingReturnAsStream
transfer mode (defaults tojson
). - (Optional)
stream_compression
: Compression format to use. This only applies when usingReturnAsStream
transfer mode (defaults tonone
) - (Optional)
trace_config
: description not provided :( - (Optional)
perfetto_config
: Base64-encoded serialized perfetto.protos.TraceConfig protobuf message When specified, the parameterscategories
,options
,traceConfig
are ignored. (Encoded as a base64 string when passed over JSON) - (Optional)
tracing_backend
: Backend type (defaults toauto
)