AppResourceSnapshot class

A point-in-time snapshot of app resource usage.

Fields are null when the corresponding metric is not being monitored. Moving-average fields (e.g. cpuPercentAvg) are computed over the configured AppResourceMonitoringConfig.movingAverageWindow.

Constructors

AppResourceSnapshot({required DateTime timestamp, double? cpuPercent, double? memoryMb, double? fps, double? cpuPercentAvg, double? memoryMbAvg, double? fpsAvg, int? networkRxBytes, int? networkTxBytes, int? networkRxDeltaBytes, int? networkTxDeltaBytes, double? networkRxBytesPerSec, double? networkTxBytesPerSec, int? diskReadBytes, int? diskWriteBytes, int? diskReadDeltaBytes, int? diskWriteDeltaBytes, double? diskReadBytesPerSec, double? diskWriteBytesPerSec})
const

Properties

cpuPercent double?
Current CPU usage percentage (0–100), per-app.
final
cpuPercentAvg double?
Moving average of CPU usage.
final
diskReadBytes int?
Cumulative disk bytes read.
final
diskReadBytesPerSec double?
Disk read rate in bytes per second.
final
diskReadDeltaBytes int?
Disk bytes read since the previous snapshot.
final
diskWriteBytes int?
Cumulative disk bytes written.
final
diskWriteBytesPerSec double?
Disk write rate in bytes per second.
final
diskWriteDeltaBytes int?
Disk bytes written since the previous snapshot.
final
fps double?
Current frames per second.
final
fpsAvg double?
Moving average of FPS.
final
hashCode int
The hash code for this object.
no setterinherited
memoryMb double?
Current memory usage in megabytes.
final
memoryMbAvg double?
Moving average of memory usage.
final
networkRxBytes int?
Cumulative network bytes received.
final
networkRxBytesPerSec double?
Network receive rate in bytes per second.
final
networkRxDeltaBytes int?
Network bytes received since the previous snapshot.
final
networkTxBytes int?
Cumulative network bytes transmitted.
final
networkTxBytesPerSec double?
Network transmit rate in bytes per second.
final
networkTxDeltaBytes int?
Network bytes transmitted since the previous snapshot.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timestamp DateTime
When this snapshot was taken.
final

Methods

copyWith({DateTime? timestamp, double? cpuPercent, double? memoryMb, double? fps, double? cpuPercentAvg, double? memoryMbAvg, double? fpsAvg, int? networkRxBytes, int? networkTxBytes, int? networkRxDeltaBytes, int? networkTxDeltaBytes, double? networkRxBytesPerSec, double? networkTxBytesPerSec, int? diskReadBytes, int? diskWriteBytes, int? diskReadDeltaBytes, int? diskWriteDeltaBytes, double? diskReadBytesPerSec, double? diskWriteBytesPerSec}) AppResourceSnapshot
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited