CpuProfiler class

CPU profiler for monitoring CPU usage during performance testing

Constructors

CpuProfiler()

Properties

allSnapshots List<CpuSnapshot>
List of all CPU snapshots
no setter
currentCpuUsage double
Gets current CPU usage percentage
no setter
hashCode int
The hash code for this object.
no setterinherited
isProfiling bool
Whether CPU profiling is currently active
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
snapshots Stream<CpuSnapshot>
Stream of CPU snapshots
no setter

Methods

clearSnapshots() → void
Clears all CPU snapshots
dispose() → void
Disposes the CPU profiler
exportData() Map<String, dynamic>
Exports CPU data to JSON format
generateReport() CpuReport
Generates a CPU profiling report
getAverageCpuUsage({Duration duration = const Duration(seconds: 1)}) double
Gets average CPU usage over specified duration
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
startProfiling({Duration interval = const Duration(milliseconds: 100)}) → void
Starts CPU profiling with specified interval
stopProfiling() → void
Stops CPU profiling
takeSnapshot() CpuSnapshot
Takes a single CPU snapshot
toString() String
A string representation of this object.
inherited

Operators

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