TracingLogger

public class TracingLogger
extends Object

java.lang.Object
   ↳ com.android.tradefed.invoker.tracing.TracingLogger


Class that helps to manage tracing for each test invocation.

Summary

Public constructors

TracingLogger()

Public methods

static ActiveTrace createActiveTrace(long pid, long tid, boolean mainProcess)
static ActiveTrace createActiveTrace(long pid, long tid)

Creates and register an active trace for an invocation.

static File finalizeTrace()

Finalize the tracing and clear the tracking.

static ActiveTrace getActiveTrace()

Returns the current active trace for the invocation, or null if none.

static ActiveTrace getActiveTraceForGroup(ThreadGroup group)
static ActiveTrace getMainTrace()

If it exists, returns the current trace of the Tradefed process itself.

static void resetLocalGroup()

Resets the localized context.

static void setLocalGroup(ThreadGroup tg)

Tracks a localized context when using the properties inside the gRPC server

Public constructors

TracingLogger

public TracingLogger ()

Public methods

createActiveTrace

public static ActiveTrace createActiveTrace (long pid, 
                long tid, 
                boolean mainProcess)

Parameters
pid long

tid long

mainProcess boolean

Returns
ActiveTrace

createActiveTrace

public static ActiveTrace createActiveTrace (long pid, 
                long tid)

Creates and register an active trace for an invocation.

Parameters
pid long: Current process id

tid long: Current thread id

Returns
ActiveTrace

finalizeTrace

public static File finalizeTrace ()

Finalize the tracing and clear the tracking.

Returns
File

getActiveTrace

public static ActiveTrace getActiveTrace ()

Returns the current active trace for the invocation, or null if none.

Returns
ActiveTrace

getActiveTraceForGroup

public static ActiveTrace getActiveTraceForGroup (ThreadGroup group)

Parameters
group ThreadGroup

Returns
ActiveTrace

getMainTrace

public static ActiveTrace getMainTrace ()

If it exists, returns the current trace of the Tradefed process itself.

Returns
ActiveTrace

resetLocalGroup

public static void resetLocalGroup ()

Resets the localized context.

setLocalGroup

public static void setLocalGroup (ThreadGroup tg)

Tracks a localized context when using the properties inside the gRPC server

Parameters
tg ThreadGroup