Ab dem 27. März 2025 empfehlen wir, android-latest-release
anstelle von aosp-main
zu verwenden, um AOSP zu erstellen und Beiträge dazu zu leisten. Weitere Informationen finden Sie unter Änderungen am AOSP.
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
TracingLogger
public
class
TracingLogger
extends Object
java.lang.Object
|
↳ |
com.android.tradefed.invoker.tracing.TracingLogger
|
Klasse, die beim Verwalten der Tracing-Daten für jede Testausführung hilft.
Zusammenfassung
Öffentliche Konstruktoren
TracingLogger
public TracingLogger ()
Öffentliche Methoden
createActiveTrace
public static ActiveTrace createActiveTrace (long pid,
long tid,
boolean mainProcess)
Parameter |
pid |
long |
tid |
long |
mainProcess |
boolean |
createActiveTrace
public static ActiveTrace createActiveTrace (long pid,
long tid)
Erstellt und registriert eine aktive Trace-Datei für eine Aufrufabfolge.
Parameter |
pid |
long : Aktuelle Prozess-ID |
tid |
long : Aktuelle Thread-ID |
finalizeTrace
public static File finalizeTrace ()
Schließen Sie die Verfolgung ab und löschen Sie die Daten.
getActiveTrace
public static ActiveTrace getActiveTrace ()
Gibt den aktuellen aktiven Trace für die Aufrufe zurück oder null, wenn keiner vorhanden ist.
getActiveTraceForGroup
public static ActiveTrace getActiveTraceForGroup (ThreadGroup group)
Parameter |
group |
ThreadGroup |
getMainTrace
public static ActiveTrace getMainTrace ()
Wenn er vorhanden ist, wird die aktuelle Spur des Tradefed-Prozesses selbst zurückgegeben.
resetLocalGroup
public static void resetLocalGroup ()
Setzt den lokalisierten Kontext zurück.
setLocalGroup
public static void setLocalGroup (ThreadGroup tg)
Erfasst einen lokalisierten Kontext bei Verwendung der Properties auf dem gRPC-Server.
Alle Inhalte und Codebeispiele auf dieser Seite unterliegen den Lizenzen wie im Abschnitt Inhaltslizenz beschrieben. Java und OpenJDK sind Marken oder eingetragene Marken von Oracle und/oder seinen Tochtergesellschaften.
Zuletzt aktualisiert: 2025-07-27 (UTC).
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Benötigte Informationen nicht gefunden","missingTheInformationINeed","thumb-down"],["Zu umständlich/zu viele Schritte","tooComplicatedTooManySteps","thumb-down"],["Nicht mehr aktuell","outOfDate","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Problem mit Beispielen/Code","samplesCodeIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-07-27 (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 |"]]