getLoadingStats method
Get loading statistics
Implementation
Map<String, int> getLoadingStats() {
final totalPallets = registry.prefixed.metadata.pallets
.where((p) => p.constants.isNotEmpty)
.length;
int totalConstants = 0;
int loadedConstants = 0;
for (final pallet in registry.prefixed.metadata.pallets) {
totalConstants += pallet.constants.length;
loadedConstants += _decodedCache[pallet.name]?.length ?? 0;
}
return <String, int>{
'totalPallets': totalPallets,
'loadedPallets': _decodedCache.length,
'fullyLoadedPallets': _fullyLoadedPallets.length,
'totalConstants': totalConstants,
'loadedConstants': loadedConstants,
'metadataCachedPallets': _metadataCache.length,
};
}