25 #ifndef ACE_ROUTINE_LOG_BIN_TABLE_RENDERER_H
26 #define ACE_ROUTINE_LOG_BIN_TABLE_RENDERER_H
31 #include "LogBinProfiler.h"
33 namespace ace_routine {
38 const uint8_t kNumBinLabels = 32;
41 extern const char*
const kBinLabels[kNumBinLabels] PROGMEM;
50 void printHeaderTo( Print& printer, uint8_t startBin, uint8_t endBin);
57 void printPStringTo(Print& printer,
const char* s, uint8_t boxSize);
72 const uint16_t bins[],
104 template <
typename T_COROUTINE>
131 if (endBin <= startBin)
return;
135 bool isHeaderPrinted =
false;
136 T_COROUTINE** root = T_COROUTINE::getRoot();
137 for (T_COROUTINE** p = root; (*p) !=
nullptr; p = (*p)->getNext()) {
138 auto* profiler = (
Profiler*) (*p)->getProfiler();
139 if (! profiler)
continue;
142 if (! isHeaderPrinted) {
143 printer.print(F(
"name "));
144 internal::printHeaderTo(printer, startBin, endBin);
146 isHeaderPrinted =
true;
152 (*p)->printNameTo(printer, 12);
155 const uint16_t* bins;
157 internal::rollupExteriorBins(
161 bins = profiler->mBins;
167 internal::printBinsTo(
178 using LogBinTableRenderer = LogBinTableRendererTemplate<Coroutine>;