TraceProcessor.Companion


public static class TraceProcessor.Companion


Summary

Public methods

static final @NonNull T
@ExperimentalTraceProcessorApi
@<Error class: unknown class>
<T extends Object> runServer(
    @NonNull ServerLifecycleManager serverLifecycleManager,
    @NonNull TraceProcessor.EventCallback eventCallback,
    @NonNull TraceProcessor.Tracer tracer,
    @NonNull Duration timeout,
    @ExtensionFunctionType @NonNull Function1<@NonNull TraceProcessor, @NonNull T> block
)

Starts a Perfetto trace processor shell server in http mode, loads a trace and executes the given block.

Extension functions

static final @NonNull T

Starts a Perfetto Trace Processor shell server in http mode, loads a trace and executes the given block.

static final @NonNull T
<T extends Object> TraceProcessorExtensionsKt.runServer(
    @NonNull TraceProcessor.Companion receiver,
    @NonNull Duration timeout,
    @ExtensionFunctionType @NonNull Function1<@NonNull TraceProcessor, @NonNull T> block
)

Starts a Perfetto Trace Processor shell server in http mode, loads a trace and executes the given block.

Public methods

runServer

@ExperimentalTraceProcessorApi
@<Error class: unknown class>
public static final @NonNull T <T extends Object> runServer(
    @NonNull ServerLifecycleManager serverLifecycleManager,
    @NonNull TraceProcessor.EventCallback eventCallback,
    @NonNull TraceProcessor.Tracer tracer,
    @NonNull Duration timeout,
    @ExtensionFunctionType @NonNull Function1<@NonNull TraceProcessor, @NonNull T> block
)

Starts a Perfetto trace processor shell server in http mode, loads a trace and executes the given block.

Parameters
@NonNull ServerLifecycleManager serverLifecycleManager

controls starting and stopping the TraceProcessor process.

@NonNull TraceProcessor.EventCallback eventCallback

callback for events such as trace load failure.

@NonNull TraceProcessor.Tracer tracer

used to trace begin and end of significant events within this managed run.

@NonNull Duration timeout

waiting for the server to start. If less or equal to zero use 60 seconds

@ExtensionFunctionType @NonNull Function1<@NonNull TraceProcessor, @NonNull T> block

Command to execute using trace processor

Extension functions

TraceProcessorExtensionsKt.runServer

public static final @NonNull T <T extends Object> TraceProcessorExtensionsKt.runServer(
    @NonNull TraceProcessor.Companion receiver,
    @ExtensionFunctionType @NonNull Function1<@NonNull TraceProcessor, @NonNull T> block
)

Starts a Perfetto Trace Processor shell server in http mode, loads a trace and executes the given block. It stops the server after the block is complete

Uses a default timeout of 60 seconds.

Parameters
@ExtensionFunctionType @NonNull Function1<@NonNull TraceProcessor, @NonNull T> block

Command to execute using trace processor

TraceProcessorExtensionsKt.runServer

public static final @NonNull T <T extends Object> TraceProcessorExtensionsKt.runServer(
    @NonNull TraceProcessor.Companion receiver,
    @NonNull Duration timeout,
    @ExtensionFunctionType @NonNull Function1<@NonNull TraceProcessor, @NonNull T> block
)

Starts a Perfetto Trace Processor shell server in http mode, loads a trace and executes the given block. It stops the server after the block is complete

Parameters
@NonNull Duration timeout

waiting for the server to start. If less or equal to zero uses 60 seconds

@ExtensionFunctionType @NonNull Function1<@NonNull TraceProcessor, @NonNull T> block

Command to execute using trace processor