public class BluetoothMetricsCollector extends SystemMetricsCollector<BluetoothMetrics>
addScan(long)
to record a bluetooth scan.Constructor and Description |
---|
BluetoothMetricsCollector() |
Modifier and Type | Method and Description |
---|---|
void |
addScan(long durationMs)
Record a bluetooth scan with the duration it ran for.
|
BluetoothMetrics |
createMetrics()
Creates an empty instance of the corresponding system metrics.
|
boolean |
getSnapshot(BluetoothMetrics snapshot)
Note that access to snapshot instances is not synchronized and must be taken care of
by the caller requesting getSnapshot.
|
public boolean getSnapshot(BluetoothMetrics snapshot)
SystemMetricsCollector
getSnapshot
in class SystemMetricsCollector<BluetoothMetrics>
snapshot
- snapshot on which the data will be writtenpublic BluetoothMetrics createMetrics()
SystemMetricsCollector
Explicitly having this function available reduces a significant amount of boilerplate
createMetrics
in class SystemMetricsCollector<BluetoothMetrics>
public void addScan(long durationMs)