InvocationMetricLogger
public
class
InvocationMetricLogger
extends Object
| java.lang.Object | |
| ↳ | com.android.tradefed.invoker.logger.InvocationMetricLogger |
Eine Hilfsklasse für einen Aufruf, um einige Messwerte zu protokollieren.
Zusammenfassung
Öffentliche Methoden | |
|---|---|
static
void
|
addInvocationMetrics(InvocationMetricLogger.InvocationMetricKey key, long value)
Fügt einen Schlüssel/Wert-Paar hinzu, das auf Aufrufebene erfasst werden soll. |
static
void
|
addInvocationMetrics(InvocationMetricLogger.InvocationMetricKey key, String value)
Fügt einen Schlüssel/Wert-Paar hinzu, das auf Aufrufebene erfasst werden soll. |
static
void
|
addInvocationMetrics(InvocationMetricLogger.InvocationGroupMetricKey groupKey, String group, String value)
Fügt einen Schlüssel/Wert-Paar für eine bestimmte Gruppe hinzu. |
static
void
|
addInvocationMetrics(InvocationMetricLogger.InvocationGroupMetricKey groupKey, String group, long value)
Fügt einen Schlüssel/Wert-Paar hinzu, das auf Aufrufebene für eine bestimmte Gruppe erfasst werden soll. |
static
void
|
addInvocationPairMetrics(InvocationMetricLogger.InvocationMetricKey key, long start, long end)
Fügt ein Wertepaar hinzu, das demselben Schlüssel zugeordnet ist. |
static
void
|
clearInvocationMetrics()
Löscht die Aufrufmesswerte für einen Aufruf. |
static
Map<String, String>
|
getInvocationMetrics()
Gibt die Map der Aufrufmesswerte für den laufenden Aufruf zurück. |
static
void
|
resetLocalGroup()
Setzt den lokalisierten Kontext zurück. |
static
void
|
setLocalGroup(ThreadGroup tg)
Erfasst einen lokalisierten Kontext, wenn die Eigenschaften im gRPC-Server verwendet werden. |
Öffentliche Methoden
addInvocationMetrics
public static void addInvocationMetrics (InvocationMetricLogger.InvocationMetricKey key, long value)
Fügt einen Schlüssel/Wert-Paar hinzu, das auf Aufrufebene erfasst werden soll.
| Parameter | |
|---|---|
key |
InvocationMetricLogger.InvocationMetricKey: Der Schlüssel, unter dem der Aufrufmesswert erfasst wird. |
value |
long: Der Wert des Aufrufmesswerts. |
addInvocationMetrics
public static void addInvocationMetrics (InvocationMetricLogger.InvocationMetricKey key, String value)
Fügt einen Schlüssel/Wert-Paar hinzu, das auf Aufrufebene erfasst werden soll.
| Parameter | |
|---|---|
key |
InvocationMetricLogger.InvocationMetricKey: Der Schlüssel, unter dem der Aufrufmesswert erfasst wird. |
value |
String: Der Wert des Aufrufmesswerts. |
addInvocationMetrics
public static void addInvocationMetrics (InvocationMetricLogger.InvocationGroupMetricKey groupKey, String group, String value)
Fügt einen Schlüssel/Wert-Paar für eine bestimmte Gruppe hinzu.
| Parameter | |
|---|---|
groupKey |
InvocationMetricLogger.InvocationGroupMetricKey: Der Schlüssel der Gruppe |
group |
String: Der Gruppenname, der mit dem Schlüssel verknüpft ist |
value |
String: Der Wert für die Gruppe |
addInvocationMetrics
public static void addInvocationMetrics (InvocationMetricLogger.InvocationGroupMetricKey groupKey, String group, long value)
Fügt einen Schlüssel/Wert-Paar hinzu, das auf Aufrufebene für eine bestimmte Gruppe erfasst werden soll.
| Parameter | |
|---|---|
groupKey |
InvocationMetricLogger.InvocationGroupMetricKey: Der Schlüssel der Gruppe |
group |
String: Der Gruppenname, der mit dem Schlüssel verknüpft ist |
value |
long: Der Wert für die Gruppe |
addInvocationPairMetrics
public static void addInvocationPairMetrics (InvocationMetricLogger.InvocationMetricKey key, long start, long end)
Fügt ein Wertepaar hinzu, das demselben Schlüssel zugeordnet ist. Wird normalerweise für Start- und Endzeitstempel verwendet.
| Parameter | |
|---|---|
key |
InvocationMetricLogger.InvocationMetricKey: Der Schlüssel, unter dem der Aufrufmesswert erfasst wird. |
start |
long: Der Startwert des Aufrufmesswerts. |
end |
long: Der Endwert des Aufrufmesswerts. |
clearInvocationMetrics
public static void clearInvocationMetrics ()
Löscht die Aufrufmesswerte für einen Aufruf.
getInvocationMetrics
public static Map<String, String> getInvocationMetrics ()
Gibt die Map der Aufrufmesswerte für den laufenden Aufruf zurück.
| Gibt Folgendes zurück: | |
|---|---|
Map<String, String> |
|
resetLocalGroup
public static void resetLocalGroup ()
Setzt den lokalisierten Kontext zurück.
setLocalGroup
public static void setLocalGroup (ThreadGroup tg)
Erfasst einen lokalisierten Kontext, wenn die Eigenschaften im gRPC-Server verwendet werden.
| Parameter | |
|---|---|
tg |
ThreadGroup |