AceRoutine
1.5.0
A low-memory, fast-switching, cooperative multitasking library using stackless coroutines on Arduino platforms.
|
Print the information in the LogBinProfiler for each Coroutine in a human-readable table. More...
#include <LogBinTableRenderer.h>
Public Types | |
using | Profiler = LogBinProfilerTemplate< T_COROUTINE > |
Typedef of the LogBinProfiler supported by this class. | |
Static Public Member Functions | |
static void | printTo (Print &printer, uint8_t startBin, uint8_t endBin, bool clear=true, bool rollup=true) |
Loop over all coroutines and print the ASCII version of the frequency distribution. More... | |
Print the information in the LogBinProfiler for each Coroutine in a human-readable table.
Each bin is printed as a 5-digit number, since the bins use a uint16_t
integer for the count. The number of digits in the printed number is equivalent to the log10() of the frequency count. To see why that's true, imagine if each digit of the bin count was replaced by a '*' character. Therefore the table is a rough ASCII version of a log-log graph of the frequency count.
For example, the output of printTo(Serial, 2, 10)
for examples/SoundManager
looks like this:
* name <8us <16us <32us <64us<128us<256us<512us <1ms <2ms >> * soundManager 1418 0 0 1 0 0 0 0 1 0 * soundRoutine 1417 0 0 1 1 1 0 0 0 0 *
The bins below the first bin (at startBin
) are rolled into the first bin. The bins above the last bin (at endBin-1
) are rolled into the last bin and printed with the label >>
.
T_COROUTINE | class of the specific CoroutineTemplate instantiation, usually Coroutine |
Definition at line 105 of file LogBinTableRenderer.h.
|
inlinestatic |
Loop over all coroutines and print the ASCII version of the frequency distribution.
This assumes that all the coroutines are using the same CoroutineProfiler class, so we can use any of the profilers to print the header, and the numbers will be lined up properly.
printer | destination of output, usually Serial |
startBin | start index of the bins (0-31) |
endBin | end index (exclusive) of the bins (0-32) |
clear | call LogBinProfiler::clear() after printing (default true) |
rollup | roll-up exterior bins into the first and last bins (default true) |
Definition at line 124 of file LogBinTableRenderer.h.