enabled property
bool
get
enabled
Whether recording is active. The setter lazily allocates the clock and accumulators on first enable; disabling stops recording but keeps accumulated data for snapshot.
Implementation
static bool get enabled => kPdfPerfCompiledIn && _enabled;
set
enabled
(bool value)
Implementation
static set enabled(bool value) {
if (!kPdfPerfCompiledIn) return;
if (value && _phaseUs == null) {
_clock = Stopwatch()..start();
_phaseUs = List<int>.filled(PdfPerfPhase.values.length, 0);
_phaseCalls = List<int>.filled(PdfPerfPhase.values.length, 0);
_counts = List<int>.filled(PdfPerfCount.values.length, 0);
_events = List<int>.filled(PdfPerfEvent.values.length, 0);
sink?.call('$debugDceMarker recording on');
}
_enabled = value;
}