Od 27 marca 2025 r. zalecamy używanie android-latest-release
zamiast aosp-main
do kompilowania i wspołtworzenia AOSP. Więcej informacji znajdziesz w artykule o zmianach w AOSP.
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
TracingLogger
public
class
TracingLogger
extends Object
java.lang.Object
|
↳ |
com.android.tradefed.invoker.tracing.TracingLogger
|
Klasa, która pomaga zarządzać śledzeniem w przypadku każdego wywołania testu.
Podsumowanie
Konstruktory publiczne
TracingLogger
public TracingLogger ()
Metody publiczne
createActiveTrace
public static ActiveTrace createActiveTrace (long pid,
long tid,
boolean mainProcess)
Parametry |
pid |
long |
tid |
long |
mainProcess |
boolean |
createActiveTrace
public static ActiveTrace createActiveTrace (long pid,
long tid)
Tworzy i rejestruje aktywny ślad wywołania.
Parametry |
pid |
long : identyfikator bieżącego procesu |
tid |
long : identyfikator bieżącego wątku |
finalizeTrace
public static File finalizeTrace ()
Zakończ śledzenie i wyczyść pliki śledzenia.
getActiveTrace
public static ActiveTrace getActiveTrace ()
Zwraca bieżący aktywny ślad wywołania lub wartość null, jeśli nie ma żadnego.
getActiveTraceForGroup
public static ActiveTrace getActiveTraceForGroup (ThreadGroup group)
Parametry |
group |
ThreadGroup |
getMainTrace
public static ActiveTrace getMainTrace ()
Jeśli istnieje, zwraca bieżący ślad samego procesu Tradefed.
resetLocalGroup
public static void resetLocalGroup ()
Resetuje lokalizowany kontekst.
setLocalGroup
public static void setLocalGroup (ThreadGroup tg)
Śledzenie kontekstu zlokalizowanego podczas korzystania z właściwości na serwerze gRPC
Treść strony i umieszczone na niej fragmenty kodu podlegają licencjom opisanym w Licencji na treści. Java i OpenJDK są znakami towarowymi lub zastrzeżonymi znakami towarowymi należącymi do firmy Oracle lub jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-27 UTC.
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 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 |"]]