InvocationMetricLogger
public
class
InvocationMetricLogger
extends Object
java.lang.Object | |
↳ | com.android.tradefed.invoker.logger.InvocationMetricLogger |
A utility class for an invocation to log some metrics.
Summary
Public methods | |
---|---|
static
void
|
addInvocationMetrics(InvocationMetricLogger.InvocationMetricKey key, long value)
Add one key-value to be tracked at the invocation level. |
static
void
|
addInvocationMetrics(InvocationMetricLogger.InvocationMetricKey key, String value)
Add one key-value to be tracked at the invocation level. |
static
void
|
addInvocationMetrics(InvocationMetricLogger.InvocationGroupMetricKey groupKey, String group, String value)
Add one key-value for a given group |
static
void
|
addInvocationMetrics(InvocationMetricLogger.InvocationGroupMetricKey groupKey, String group, long value)
Add one key-value to be tracked at the invocation level for a given group. |
static
void
|
addInvocationPairMetrics(InvocationMetricLogger.InvocationMetricKey key, long start, long end)
Add a pair of value associated with the same key. |
static
void
|
clearInvocationMetrics()
Clear the invocation metrics for an invocation. |
static
|
getInvocationMetrics()
Returns the Map of invocation metrics for the invocation in progress. |
static
void
|
resetLocalGroup()
Resets the localized context. |
static
void
|
setLocalGroup(ThreadGroup tg)
Tracks a localized context when using the properties inside the gRPC server |
Public methods
addInvocationMetrics
public static void addInvocationMetrics (InvocationMetricLogger.InvocationMetricKey key, long value)
Add one key-value to be tracked at the invocation level.
Parameters | |
---|---|
key |
InvocationMetricLogger.InvocationMetricKey : The key under which the invocation metric will be tracked. |
value |
long : The value of the invocation metric. |
addInvocationMetrics
public static void addInvocationMetrics (InvocationMetricLogger.InvocationMetricKey key, String value)
Add one key-value to be tracked at the invocation level.
Parameters | |
---|---|
key |
InvocationMetricLogger.InvocationMetricKey : The key under which the invocation metric will be tracked. |
value |
String : The value of the invocation metric. |
addInvocationMetrics
public static void addInvocationMetrics (InvocationMetricLogger.InvocationGroupMetricKey groupKey, String group, String value)
Add one key-value for a given group
Parameters | |
---|---|
groupKey |
InvocationMetricLogger.InvocationGroupMetricKey : The key of the group |
group |
String : The group name associated with the key |
value |
String : The value for the group |
addInvocationMetrics
public static void addInvocationMetrics (InvocationMetricLogger.InvocationGroupMetricKey groupKey, String group, long value)
Add one key-value to be tracked at the invocation level for a given group.
Parameters | |
---|---|
groupKey |
InvocationMetricLogger.InvocationGroupMetricKey : The key of the group |
group |
String : The group name associated with the key |
value |
long : The value for the group |
addInvocationPairMetrics
public static void addInvocationPairMetrics (InvocationMetricLogger.InvocationMetricKey key, long start, long end)
Add a pair of value associated with the same key. Usually used for timestamp start and end.
Parameters | |
---|---|
key |
InvocationMetricLogger.InvocationMetricKey : The key under which the invocation metric will be tracked. |
start |
long : The start value of the invocation metric. |
end |
long : The end value of the invocation metric. |
clearInvocationMetrics
public static void clearInvocationMetrics ()
Clear the invocation metrics for an invocation.
getInvocationMetrics
public staticgetInvocationMetrics ()
Returns the Map of invocation metrics for the invocation in progress.
Returns | |
---|---|
|
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 |