Reduce non-sensical logs
This commit is contained in:
@@ -567,6 +567,12 @@ void FontDecompressor::resetStats() { stats = Stats{}; }
|
||||
|
||||
void FontDecompressor::logStats(const char* label) {
|
||||
const uint32_t total = stats.cacheHits + stats.cacheMisses;
|
||||
// Suppress the block entirely when the decompressor was untouched this phase
|
||||
// (e.g. an SD-card font page — FontCacheManager early-returns before invoking us).
|
||||
if (total == 0 && stats.pageBufferBytes == 0 && stats.decompressTimeMs == 0 && stats.getBitmapCalls == 0) {
|
||||
resetStats();
|
||||
return;
|
||||
}
|
||||
LOG_DBG("FDC", "[%s] hits=%lu misses=%lu (%.1f%% hit rate)", label, stats.cacheHits, stats.cacheMisses,
|
||||
total > 0 ? 100.0f * stats.cacheHits / total : 0.0f);
|
||||
LOG_DBG("FDC", "[%s] decompress=%lums groups_accessed=%u", label, stats.decompressTimeMs, stats.uniqueGroupsAccessed);
|
||||
|
||||
@@ -1331,6 +1331,12 @@ void SdCardFont::clearAccumulation() {
|
||||
// --- Stats ---
|
||||
|
||||
void SdCardFont::logStats(const char* label) {
|
||||
// Suppress when this font wasn't touched this phase — FontCacheManager iterates every
|
||||
// registered SD font, but only the active one for the page will have non-zero stats.
|
||||
if (stats_.prewarmTotalMs == 0 && stats_.sdReadTimeMs == 0 && stats_.seekCount == 0 && stats_.uniqueGlyphs == 0 &&
|
||||
stats_.bitmapBytes == 0) {
|
||||
return;
|
||||
}
|
||||
LOG_DBG("SDCF", "[%s] total=%ums sd_read=%ums seeks=%u glyphs=%u bitmap=%u bytes", label, stats_.prewarmTotalMs,
|
||||
stats_.sdReadTimeMs, stats_.seekCount, stats_.uniqueGlyphs, stats_.bitmapBytes);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user