public abstract class SystemMetricsCollector<T extends SystemMetrics>
extends java.lang.Object
CpuMetricsCollector
which reads from /proc. - those that are
simply boxes of values and are triggered by custom instrumentation, such as the CameraMetricsCollector
which should be triggered with every
call to the android camera api.Constructor and Description |
---|
SystemMetricsCollector() |
Modifier and Type | Method and Description |
---|---|
abstract T |
createMetrics()
Creates an empty instance of the corresponding system metrics.
|
abstract boolean |
getSnapshot(T snapshot)
Note that access to snapshot instances is not synchronized and must be taken care of
by the caller requesting getSnapshot.
|
public abstract boolean getSnapshot(T snapshot)
snapshot
- snapshot on which the data will be writtenpublic abstract T createMetrics()
Explicitly having this function available reduces a significant amount of boilerplate