@@ -64,29 +64,32 @@ void setup() {
6464
6565 monitor.onScope([](const ScopeStats &s) {
6666 ESP_LOGI ("MEM", "Scope %s used %+d DRAM, %+d PSRAM in %llu us",
67- s.name.c_str(),
68- static_cast<int >(s.deltaInternalBytes),
69- static_cast<int >(s.deltaPsramBytes),
70- static_cast<unsigned long long >(s.durationUs));
67+ s.name.c_str(),
68+ static_cast<int >(s.deltaInternalBytes),
69+ static_cast<int >(s.deltaPsramBytes),
70+ static_cast<unsigned long long >(s.durationUs)
71+ );
7172 });
7273
7374 monitor.onTagThreshold([](const TagThresholdEvent &evt) {
7475 ESP_LOGW ("MEM", "Tag %s now %s at %u bytes",
75- evt.usage.name.c_str(),
76- evt.usage.state == ThresholdState::Critical ? "CRITICAL" :
77- evt.usage.state == ThresholdState::Warn ? "WARN" : "OK",
78- static_cast<unsigned >(evt.usage.totalInternalBytes + evt.usage.totalPsramBytes));
76+ evt.usage.name.c_str(),
77+ evt.usage.state == ThresholdState::Critical ? "CRITICAL" :
78+ evt.usage.state == ThresholdState::Warn ? "WARN" : "OK",
79+ static_cast<unsigned >(evt.usage.totalInternalBytes + evt.usage.totalPsramBytes)
80+ );
7981 });
8082
8183 monitor.onSample([](const MemorySnapshot &snapshot) {
8284 for (const auto ®ion : snapshot.regions) {
8385 const char *regionName = region.region == MemoryRegion::Psram ? "PSRAM" : "DRAM";
8486 ESP_LOGI ("MEM", "%s free=%uB min=%uB frag=%.02f slope=%.01fB/s t_warn=%us", regionName,
85- static_cast<unsigned >(region.freeBytes),
86- static_cast<unsigned >(region.minimumFreeBytes),
87- region.fragmentation,
88- region.freeBytesSlope,
89- region.secondsToWarn);
87+ static_cast<unsigned >(region.freeBytes),
88+ static_cast<unsigned >(region.minimumFreeBytes),
89+ region.fragmentation,
90+ region.freeBytesSlope,
91+ region.secondsToWarn
92+ );
9093 }
9194 });
9295
0 commit comments