diff --git a/README.md b/README.md index 3c1752a..42a3f45 100644 --- a/README.md +++ b/README.md @@ -64,29 +64,32 @@ void setup() { monitor.onScope([](const ScopeStats &s) { ESP_LOGI("MEM", "Scope %s used %+d DRAM, %+d PSRAM in %llu us", - s.name.c_str(), - static_cast(s.deltaInternalBytes), - static_cast(s.deltaPsramBytes), - static_cast(s.durationUs)); + s.name.c_str(), + static_cast(s.deltaInternalBytes), + static_cast(s.deltaPsramBytes), + static_cast(s.durationUs) + ); }); monitor.onTagThreshold([](const TagThresholdEvent &evt) { ESP_LOGW("MEM", "Tag %s now %s at %u bytes", - evt.usage.name.c_str(), - evt.usage.state == ThresholdState::Critical ? "CRITICAL" : - evt.usage.state == ThresholdState::Warn ? "WARN" : "OK", - static_cast(evt.usage.totalInternalBytes + evt.usage.totalPsramBytes)); + evt.usage.name.c_str(), + evt.usage.state == ThresholdState::Critical ? "CRITICAL" : + evt.usage.state == ThresholdState::Warn ? "WARN" : "OK", + static_cast(evt.usage.totalInternalBytes + evt.usage.totalPsramBytes) + ); }); monitor.onSample([](const MemorySnapshot &snapshot) { for (const auto ®ion : snapshot.regions) { const char *regionName = region.region == MemoryRegion::Psram ? "PSRAM" : "DRAM"; ESP_LOGI("MEM", "%s free=%uB min=%uB frag=%.02f slope=%.01fB/s t_warn=%us", regionName, - static_cast(region.freeBytes), - static_cast(region.minimumFreeBytes), - region.fragmentation, - region.freeBytesSlope, - region.secondsToWarn); + static_cast(region.freeBytes), + static_cast(region.minimumFreeBytes), + region.fragmentation, + region.freeBytesSlope, + region.secondsToWarn + ); } });