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 |
android.support.v4.util.SimpleArrayMap<java.lang.String,java.lang.Long> |
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, sum
public final android.support.v4.util.SimpleArrayMap<java.lang.String,java.lang.Long> tagTimeMs
public boolean isAttributionEnabled
public long heldTimeMs
public WakeLockMetrics()
public WakeLockMetrics(boolean isAttributionEnabled)
public WakeLockMetrics sum(@Nullable WakeLockMetrics b, @Nullable WakeLockMetrics output)
SystemMetrics
sum
in class SystemMetrics<WakeLockMetrics>
public WakeLockMetrics diff(@Nullable WakeLockMetrics b, @Nullable WakeLockMetrics output)
SystemMetrics
diff
in class SystemMetrics<WakeLockMetrics>
public WakeLockMetrics set(WakeLockMetrics b)
SystemMetrics
set
in class SystemMetrics<WakeLockMetrics>
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object