AutoSnapshottingConfig class
Configures auto-snapshotting, based on the value of ProcessInfo.currentRss
(dart:io).
Automatic snapshots will begin to be taken when the rss value exceeds thresholdMb. The snapshots will be saved to directory.
The snapshots will be re-taken when the value increases more than by increaseMb since previous snapshot, until the size of directory exceeds directorySizeLimitMb.
The onSnapshot callback is called when a snapshot is taken.
Set minDelayBetweenSnapshots to make sure snapshots do not trigger each other.
Constructors
- AutoSnapshottingConfig({int thresholdMb = 1024, int? increaseMb = 512, String directory = 'dart_memory_snapshots', int directorySizeLimitMb = 10240, Duration minDelayBetweenSnapshots = const Duration(seconds: 10), SnapshotCallback? onSnapshot})
Properties
- directory → String
-
The directory where snapshots will be saved.
final
- directoryAbsolute → String
-
The absolute path to the directory.
no setter
- directorySizeLimitMb → int
-
The size limit for the directory in Mb.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- increaseMb → int?
-
The value by which the rss value should increase, since
previous snapshot, to take another snapshot.
final
- minDelayBetweenSnapshots → Duration
-
How long to wait after taking a snapshot before taking another one.
final
- onSnapshot → SnapshotCallback?
-
A callback that is called when a snapshot is taken.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- thresholdMb → int
-
The rss value in Mb that will trigger the first snapshot.
final
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