-
public interface InsightsCollectorCollects performance related events and notifies its listeners at a regular interval.
-
-
Method Summary
Modifier and Type Method Description abstract UnitaddUpdateListener(InsightsUpdatesListener listener)Registers the given listener to be notified of data updates. abstract UnitremoveUpdateListener(InsightsUpdatesListener listener)Unregisters the given listener from data updates notifications. abstract UnitonNewView(String name)Notifies the collector that a new view has been created. abstract UnitonAction()Notifies the collector that a user action has been detected. abstract UnitonLongTask(Long durationNs)Notifies the collector that a long task has been detected. abstract UnitonSlowFrame(Long durationNs)Notifies the collector that a slow frame has been detected. abstract UnitonNetworkRequest(Long durationNs)Notifies the collector that a network request has been detected. abstract UnitonCpuVital(Double cpuTicks)Notifies the collector with the latest CPU vital value. abstract UnitonMemoryVital(Double memoryValue)Notifies the collector with the latest Memory vital value. abstract UnitonSlowFrameRate(Double rate)Notifies the collector with the latest Slow Frame Rate vital value. abstract IntegergetMaxSize()Maximum number of events stored in memory. abstract UnitsetMaxSize(Integer maxSize)Maximum number of events stored in memory. abstract LonggetUpdateIntervalMs()Time interval in milliseconds at which the listeners will be notified of data updates. abstract UnitsetUpdateIntervalMs(Long updateIntervalMs)Time interval in milliseconds at which the listeners will be notified of data updates. -
-
Method Detail
-
addUpdateListener
abstract Unit addUpdateListener(InsightsUpdatesListener listener)
Registers the given listener to be notified of data updates.
- Parameters:
listener- the listener to register.
-
removeUpdateListener
abstract Unit removeUpdateListener(InsightsUpdatesListener listener)
Unregisters the given listener from data updates notifications.
- Parameters:
listener- the listener to unregister.
-
onNewView
abstract Unit onNewView(String name)
Notifies the collector that a new view has been created.
- Parameters:
name- the name of the new view.
-
onLongTask
abstract Unit onLongTask(Long durationNs)
Notifies the collector that a long task has been detected.
- Parameters:
durationNs- the duration of the long task, in nanoseconds.
-
onSlowFrame
abstract Unit onSlowFrame(Long durationNs)
Notifies the collector that a slow frame has been detected.
- Parameters:
durationNs- the duration of the slow frame, in nanoseconds.
-
onNetworkRequest
abstract Unit onNetworkRequest(Long durationNs)
Notifies the collector that a network request has been detected.
- Parameters:
durationNs- the duration of the network request, in nanoseconds.
-
onCpuVital
abstract Unit onCpuVital(Double cpuTicks)
Notifies the collector with the latest CPU vital value.
- Parameters:
cpuTicks- the CPU ticks per second value.
-
onMemoryVital
abstract Unit onMemoryVital(Double memoryValue)
Notifies the collector with the latest Memory vital value.
- Parameters:
memoryValue- the memory value in megabytes.
-
onSlowFrameRate
abstract Unit onSlowFrameRate(Double rate)
Notifies the collector with the latest Slow Frame Rate vital value.
- Parameters:
rate- the slow frame rate value.
-
getMaxSize
abstract Integer getMaxSize()
Maximum number of events stored in memory.
-
setMaxSize
abstract Unit setMaxSize(Integer maxSize)
Maximum number of events stored in memory.
-
getUpdateIntervalMs
abstract Long getUpdateIntervalMs()
Time interval in milliseconds at which the listeners will be notified of data updates.
-
setUpdateIntervalMs
abstract Unit setUpdateIntervalMs(Long updateIntervalMs)
Time interval in milliseconds at which the listeners will be notified of data updates.
-
-
-
-