public class AppWakeupMetricsCollector extends SystemMetricsCollector<AppWakeupMetrics>
recordWakeupStart(AppWakeupMetrics.WakeupReason, String) and end recordWakeupEnd(String) of a wakeup| Constructor and Description |
|---|
AppWakeupMetricsCollector() |
| Modifier and Type | Method and Description |
|---|---|
AppWakeupMetrics |
createMetrics()
Creates an empty instance of the corresponding system metrics.
|
boolean |
getSnapshot(AppWakeupMetrics snapshot)
Note that access to snapshot instances is not synchronized and must be taken care of
by the caller requesting getSnapshot.
|
void |
recordWakeupEnd(java.lang.String id)
Record the end of a wakeup.
|
void |
recordWakeupStart(AppWakeupMetrics.WakeupReason reason,
java.lang.String id)
Record the start of a wakeup.
|
public boolean getSnapshot(AppWakeupMetrics snapshot)
SystemMetricsCollectorgetSnapshot in class SystemMetricsCollector<AppWakeupMetrics>snapshot - snapshot on which the data will be writtenpublic AppWakeupMetrics createMetrics()
SystemMetricsCollectorExplicitly having this function available reduces a significant amount of boilerplate
createMetrics in class SystemMetricsCollector<AppWakeupMetrics>public void recordWakeupStart(AppWakeupMetrics.WakeupReason reason, java.lang.String id)
reason - One of the wakeup types defined in WakeupReasonid - Identifier of the wakeuppublic void recordWakeupEnd(java.lang.String id)
id - Identifier of the wakeup