public class WakeLockMetrics extends SystemMetrics<WakeLockMetrics>
A wakelock metrics object can also maintain attribution data if enabled at creation time -- this will come at the cost of extra memory to maintain this information.
| Modifier and Type | Field and Description |
|---|---|
long |
heldTimeMs |
boolean |
isAttributionEnabled |
<any> |
tagTimeMs |
| Constructor and Description |
|---|
WakeLockMetrics()
Create a WakeLockMetrics object without attribution enabled.
|
WakeLockMetrics(boolean isAttributionEnabled)
Create a WakeLockMetrics object and enable attribution based on the argument.
|
| Modifier and Type | Method and Description |
|---|---|
WakeLockMetrics |
diff(WakeLockMetrics b,
WakeLockMetrics output)
Subtract the object passed in from the current object.
|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
WakeLockMetrics |
set(WakeLockMetrics b)
Sets all fields in this to values from the SystemMetrics object passed in: a _deep_ copy that
shouldn't share any values with other metrics objects.
|
WakeLockMetrics |
sum(WakeLockMetrics b,
WakeLockMetrics output)
Add values from the SystemMetrics object passed in and sets them on the output object, if
available.
|
java.lang.String |
toString() |
diff, sumpublic final <any> tagTimeMs
public boolean isAttributionEnabled
public long heldTimeMs
public WakeLockMetrics()
public WakeLockMetrics(boolean isAttributionEnabled)
public WakeLockMetrics sum(WakeLockMetrics b, WakeLockMetrics output)
SystemMetricsFor convenience, this function accepts null values and will allocate an output object if none is passed in.
sum in class SystemMetrics<WakeLockMetrics>public WakeLockMetrics diff(WakeLockMetrics b, WakeLockMetrics output)
SystemMetricsFor convenience, this function accepts null values and will allocate an output object if none is passed in.
diff in class SystemMetrics<WakeLockMetrics>public WakeLockMetrics set(WakeLockMetrics b)
SystemMetricsset in class SystemMetrics<WakeLockMetrics>public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object