Starting March 27, 2025, we recommend using android-latest-release
instead of aosp-main
to build and contribute to AOSP. For more information, see Changes to AOSP.
Stay organized with collections
Save and categorize content based on your preferences.
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 TracingLogger ()
Public methods
createActiveTrace
public static ActiveTrace createActiveTrace (long pid,
long tid,
boolean mainProcess)
Parameters |
pid |
long |
tid |
long |
mainProcess |
boolean |
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 |
finalizeTrace
public static File finalizeTrace ()
Finalize the tracing and clear the tracking.
getActiveTrace
public static ActiveTrace getActiveTrace ()
Returns the current active trace for the invocation, or null if none.
getActiveTraceForGroup
public static ActiveTrace getActiveTraceForGroup (ThreadGroup group)
Parameters |
group |
ThreadGroup |
getMainTrace
public static ActiveTrace getMainTrace ()
If it exists, returns the current trace of the Tradefed process itself.
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 |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-07-02 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-02 UTC."],[],[],null,["# TracingLogger\n=============\n\n\n`\npublic\n\n\nclass\nTracingLogger\n`\n\n\n`\n\nextends Object\n\n\n`\n\n`\n\n\n`\n\n|---|----------------------------------------------------|\n| java.lang.Object ||\n| ↳ | com.android.tradefed.invoker.tracing.TracingLogger |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nClass that helps to manage tracing for each test invocation.\n\nSummary\n-------\n\n| ### Public constructors ||\n|------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ` `[TracingLogger](../../../../../../../reference/tradefed/com/android/tradefed/invoker/tracing/TracingLogger.html#TracingLogger())`() ` |\n\n| ### Public methods ||\n|------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` static `[ActiveTrace](../../../../../../../reference/tradefed/com/android/tradefed/invoker/tracing/ActiveTrace.html) | ` `[createActiveTrace](../../../../../../../reference/tradefed/com/android/tradefed/invoker/tracing/TracingLogger.html#createActiveTrace(long,%20long,%20boolean))`(long pid, long tid, boolean mainProcess) ` |\n| ` static `[ActiveTrace](../../../../../../../reference/tradefed/com/android/tradefed/invoker/tracing/ActiveTrace.html) | ` `[createActiveTrace](../../../../../../../reference/tradefed/com/android/tradefed/invoker/tracing/TracingLogger.html#createActiveTrace(long,%20long))`(long pid, long tid) ` Creates and register an active trace for an invocation. |\n| ` static File` | ` `[finalizeTrace](../../../../../../../reference/tradefed/com/android/tradefed/invoker/tracing/TracingLogger.html#finalizeTrace())`() ` Finalize the tracing and clear the tracking. |\n| ` static `[ActiveTrace](../../../../../../../reference/tradefed/com/android/tradefed/invoker/tracing/ActiveTrace.html) | ` `[getActiveTrace](../../../../../../../reference/tradefed/com/android/tradefed/invoker/tracing/TracingLogger.html#getActiveTrace())`() ` Returns the current active trace for the invocation, or null if none. |\n| ` static `[ActiveTrace](../../../../../../../reference/tradefed/com/android/tradefed/invoker/tracing/ActiveTrace.html) | ` `[getActiveTraceForGroup](../../../../../../../reference/tradefed/com/android/tradefed/invoker/tracing/TracingLogger.html#getActiveTraceForGroup(java.lang.ThreadGroup))`(ThreadGroup group) ` |\n| ` static `[ActiveTrace](../../../../../../../reference/tradefed/com/android/tradefed/invoker/tracing/ActiveTrace.html) | ` `[getMainTrace](../../../../../../../reference/tradefed/com/android/tradefed/invoker/tracing/TracingLogger.html#getMainTrace())`() ` If it exists, returns the current trace of the Tradefed process itself. |\n| ` static void` | ` `[resetLocalGroup](../../../../../../../reference/tradefed/com/android/tradefed/invoker/tracing/TracingLogger.html#resetLocalGroup())`() ` Resets the localized context. |\n| ` static void` | ` `[setLocalGroup](../../../../../../../reference/tradefed/com/android/tradefed/invoker/tracing/TracingLogger.html#setLocalGroup(java.lang.ThreadGroup))`(ThreadGroup tg) ` Tracks a localized context when using the properties inside the gRPC server |\n\nPublic constructors\n-------------------\n\n### TracingLogger\n\n```\npublic TracingLogger ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nPublic methods\n--------------\n\n### createActiveTrace\n\n```\npublic static ActiveTrace createActiveTrace (long pid, \n long tid, \n boolean mainProcess)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|---------------|------------------|\n| `pid` | `long` \u003cbr /\u003e |\n| `tid` | `long` \u003cbr /\u003e |\n| `mainProcess` | `boolean` \u003cbr /\u003e |\n\n| Returns ||\n|--------------------------------------------------------------------------------------------------------------|--------|\n| [ActiveTrace](../../../../../../../reference/tradefed/com/android/tradefed/invoker/tracing/ActiveTrace.html) | \u003cbr /\u003e |\n\n### createActiveTrace\n\n```\npublic static ActiveTrace createActiveTrace (long pid, \n long tid)\n```\n\nCreates and register an active trace for an invocation.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-------|-----------------------------------|\n| `pid` | `long`: Current process id \u003cbr /\u003e |\n| `tid` | `long`: Current thread id \u003cbr /\u003e |\n\n| Returns ||\n|--------------------------------------------------------------------------------------------------------------|--------|\n| [ActiveTrace](../../../../../../../reference/tradefed/com/android/tradefed/invoker/tracing/ActiveTrace.html) | \u003cbr /\u003e |\n\n### finalizeTrace\n\n```\npublic static File finalizeTrace ()\n```\n\nFinalize the tracing and clear the tracking.\n\n\u003cbr /\u003e\n\n| Returns ||\n|--------|--------|\n| `File` | \u003cbr /\u003e |\n\n### getActiveTrace\n\n```\npublic static ActiveTrace getActiveTrace ()\n```\n\nReturns the current active trace for the invocation, or null if none.\n\n\u003cbr /\u003e\n\n| Returns ||\n|--------------------------------------------------------------------------------------------------------------|--------|\n| [ActiveTrace](../../../../../../../reference/tradefed/com/android/tradefed/invoker/tracing/ActiveTrace.html) | \u003cbr /\u003e |\n\n### getActiveTraceForGroup\n\n```\npublic static ActiveTrace getActiveTraceForGroup (ThreadGroup group)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|---------|----------------------|\n| `group` | `ThreadGroup` \u003cbr /\u003e |\n\n| Returns ||\n|--------------------------------------------------------------------------------------------------------------|--------|\n| [ActiveTrace](../../../../../../../reference/tradefed/com/android/tradefed/invoker/tracing/ActiveTrace.html) | \u003cbr /\u003e |\n\n### getMainTrace\n\n```\npublic static ActiveTrace getMainTrace ()\n```\n\nIf it exists, returns the current trace of the Tradefed process itself.\n\n\u003cbr /\u003e\n\n| Returns ||\n|--------------------------------------------------------------------------------------------------------------|--------|\n| [ActiveTrace](../../../../../../../reference/tradefed/com/android/tradefed/invoker/tracing/ActiveTrace.html) | \u003cbr /\u003e |\n\n### resetLocalGroup\n\n```\npublic static void resetLocalGroup ()\n```\n\nResets the localized context.\n\n\u003cbr /\u003e\n\n### setLocalGroup\n\n```\npublic static void setLocalGroup (ThreadGroup tg)\n```\n\nTracks a localized context when using the properties inside the gRPC server\n\n\u003cbr /\u003e\n\n| Parameters ||\n|------|----------------------|\n| `tg` | `ThreadGroup` \u003cbr /\u003e |"]]