LxWorkerStat class

Metrics and metadata for a particular LxWorker execution.

LxWorkerStat provides insights into the performance and behavior of a reactive watcher. It tracks execution counts, durations, and asynchronous state.

Constructors

LxWorkerStat({int runCount = 0, Duration lastDuration = Duration.zero, Duration totalDuration = Duration.zero, DateTime? lastRun, Object? error, bool isAsync = false, bool isProcessing = false})
Creates a statistics snapshot.
const

Properties

error Object?
The most recent error encountered during execution, if any.
final
hashCode int
The hash code for this object.
no setterinherited
isAsync bool
Whether the callback is recognized as asynchronous (returns a Future).
final
isProcessing bool
Whether an asynchronous callback is currently pending completion.
final
lastDuration Duration
The duration of the most recent execution.
final
lastRun DateTime?
The timestamp of the last successful execution.
final
runCount int
The total number of times the watcher callback has been executed.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
totalDuration Duration
The cumulative duration of all executions since the watcher was created.
final

Methods

copyWith({int? runCount, Duration? lastDuration, Duration? totalDuration, DateTime? lastRun, Object? error, bool? isAsync, bool? isProcessing}) LxWorkerStat
Creates a copy of the statistics with updated fields.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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