RuntimeInsight class

Main entry point for the runtime_insight plugin.

Provides device classification into tiers (low/mid/high) based on runtime hardware characteristics, and continuous app resource monitoring via streams.

Call init before accessing any data. Example:

await RuntimeInsight.init();
print(RuntimeInsight.deviceTier); // DeviceTier.high

Constructors

RuntimeInsight()

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

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

Static Properties

deviceSpecs DeviceSpecs
The collected hardware specifications for the current device.
no setter
deviceTier DeviceTier
The classified tier (low/mid/high) for the current device.
no setter
isHighEnd bool
Returns true if the device is classified as high-end.
no setter
isInitialized bool
Whether init has been called successfully.
no setter
isLowEnd bool
Returns true if the device is classified as low-end.
no setter
isMidEnd bool
Returns true if the device is classified as mid-range.
no setter
maxParallelJobs int
no setter
maxParallelRecommended RecommendedParallelism
Recommended parallelism limits based on the device tier.
no setter

Static Methods

addMetrics(List<AppMetric> metrics) Future<void>
Adds metrics to the current set of monitored metrics.
disableMetric(AppMetric metric) Future<void>
Disables a single AppMetric in the current monitoring session.
enableHttpTracking({int maxLogs = 500}) Future<void>
Enables automatic HTTP request tracking.
enableMetric(AppMetric metric) Future<void>
Enables a single AppMetric in the current monitoring session.
init({List<AppMetric>? monitoredMetrics, AppResourceMonitoringConfig? monitoringConfig}) Future<void>
Initialises the plugin by collecting device specs and classifying the tier.
pauseMonitoring() Future<void>
Pauses the active monitoring stream without destroying it.
removeMetrics(List<AppMetric> metrics) Future<void>
Removes metrics from the current set of monitored metrics.
resumeMonitoring() Future<void>
Resumes a previously paused monitoring stream.
setInterval(Duration interval) Future<void>
Changes the polling interval for monitoring snapshots.
setMonitoredMetrics(List<AppMetric> metrics) Future<void>
Replaces the set of monitored metrics with metrics.
setMovingAverageWindow(int window) Future<void>
Sets the number of snapshots used to compute moving averages.
startMonitoring({AppResourceMonitoringConfig? config}) Stream<AppResourceSnapshot>
Starts continuous app resource monitoring and returns a broadcast stream of AppResourceSnapshot events.
stopMonitoring() Future<void>
Stops monitoring, cancels the stream subscription and releases resources.
updateMonitoringConfig(AppResourceMonitoringConfig config) Future<void>
Updates the monitoring configuration while monitoring is active.