StandardStartupTracker class

Standard implementation of the {@macro startup} interface.

This tracker captures the system time when instantiated and uses it as the reference point for all startup timing calculations. It is suitable for most JetLeaf applications where basic timing and readiness metrics are sufficient.


Example

void main() {
  final startup = StandardStartupTracker();

  // After your application has initialized
  startup.started();

  print(
    'JetLeaf started in '
    '${startup.getTimeTakenToStarted().inMilliseconds}ms',
  );
}
Inheritance

Constructors

StandardStartupTracker()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

equalizedProperties() List<Object?>
Mixin-style contract for value-based equality, hashCode, and toString.
inherited
getAction() String
Returns a string representation of the startup action, such as 'ApplicationContext refreshed' or 'JetLeaf ready'.
override
getProcessUptime() int?
Returns the current process uptime in milliseconds since the application start time, or null if unsupported.
override
getReady() Duration
Returns the current time elapsed since the application began starting.
inherited
getStartTime() int
Returns the system timestamp (in milliseconds since epoch) at which the application startup began.
override
getTimeTakenToStarted() Duration
Returns the time it took to reach the started() state.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
started() Duration
Marks the application as "started" and calculates the duration since getStartTime().
inherited
toString() String
A string representation of this object.
inherited
toStringOptions() → ToStringOptions
inherited

Operators

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