A partire dal 27 marzo 2025, ti consigliamo di utilizzare android-latest-release
anziché aosp-main
per compilare e contribuire ad AOSP. Per ulteriori informazioni, vedi Modifiche ad AOSP.
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
TracingLogger
public
class
TracingLogger
extends Object
java.lang.Object
|
↳ |
com.android.tradefed.invoker.tracing.TracingLogger
|
Classe che aiuta a gestire il monitoraggio per ogni chiamata di test.
Riepilogo
Costruttori pubblici
TracingLogger
public TracingLogger ()
Metodi pubblici
createActiveTrace
public static ActiveTrace createActiveTrace (long pid,
long tid,
boolean mainProcess)
Parametri |
pid |
long |
tid |
long |
mainProcess |
boolean |
createActiveTrace
public static ActiveTrace createActiveTrace (long pid,
long tid)
Crea e registra una traccia attiva per un'invocazione.
Parametri |
pid |
long : ID processo corrente |
tid |
long : ID thread corrente |
finalizeTrace
public static File finalizeTrace ()
Completa il rilevamento e cancellalo.
getActiveTrace
public static ActiveTrace getActiveTrace ()
Restituisce la traccia attiva corrente per l'invocazione o null se non è presente alcuna traccia.
getActiveTraceForGroup
public static ActiveTrace getActiveTraceForGroup (ThreadGroup group)
Parametri |
group |
ThreadGroup |
getMainTrace
public static ActiveTrace getMainTrace ()
Se esistente, restituisce la traccia corrente del processo Tradefed stesso.
resetLocalGroup
public static void resetLocalGroup ()
Reimposta il contesto localizzato.
setLocalGroup
public static void setLocalGroup (ThreadGroup tg)
Monitora un contesto localizzato quando utilizzi le proprietà all'interno del server gRPC
I campioni di contenuti e codice in questa pagina sono soggetti alle licenze descritte nella Licenza per i contenuti. Java e OpenJDK sono marchi o marchi registrati di Oracle e/o delle sue società consociate.
Ultimo aggiornamento 2025-07-27 UTC.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Mancano le informazioni di cui ho bisogno","missingTheInformationINeed","thumb-down"],["Troppo complicato/troppi passaggi","tooComplicatedTooManySteps","thumb-down"],["Obsoleti","outOfDate","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Problema relativo a esempi/codice","samplesCodeIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 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 |"]]