usageLogSummary static method
A human-readable end-of-run summary of recorded hits and misses, grouped into Hits/Misses and sorted by descending count. Embedders print this at run end (the VM CLI does so automatically when the env var is set). Returns a short "(no … recorded)" line when nothing was captured.
Implementation
static String usageLogSummary() {
final buffer = StringBuffer();
buffer.writeln('=== D4 relaxer/proxy/ctor usage log ===');
if (_usageHits.isEmpty && _usageMisses.isEmpty) {
buffer.writeln('(no relaxer/proxy/ctor lookups recorded)');
return buffer.toString();
}
_writeUsageSection(buffer, 'Hits', _usageHits);
_writeUsageSection(buffer, 'Misses', _usageMisses);
return buffer.toString();
}