25#define U_LIVE_STATS_NAME_COUNT (16)
32#define U_LIVE_STATS_VALUE_COUNT (1024)
#define U_LIVE_STATS_NAME_COUNT
Number of chars for the name of the live stats.
Definition: u_live_stats.h:25
#define U_LIVE_STATS_VALUE_COUNT
Max number of values that can be put into the trackers.
Definition: u_live_stats.h:32
static bool u_ls_ns_add(struct u_live_stats_ns *uls, uint64_t value)
Add a value to the live stats struct, returns true if the struct is full either before or after addin...
Definition: u_live_stats.h:60
Struct to do live statistic tracking and printing of nano-seconds values, used by amongst other the c...
Definition: u_live_stats.h:41
uint32_t value_count
Number of values currently in struct.
Definition: u_live_stats.h:46
void u_ls_ns_get_and_reset(struct u_live_stats_ns *uls, uint64_t *out_median, uint64_t *out_mean, uint64_t *out_worst)
Get the median, mean and worst of the current set of values, then reset the struct.
Definition: u_live_stats.cpp:72
void u_ls_ns_print_header(u_pp_delegate_t dg)
Prints a header that looks nice before u_ls_ns_print_and_reset, adding details about columns.
Definition: u_live_stats.cpp:100
char name[(16)]
Small name used for printing.
Definition: u_live_stats.h:43
void u_ls_ns_print_and_reset(struct u_live_stats_ns *uls, u_pp_delegate_t dg)
Prints the calculated values and resets the struct, can be used with u_ls_ns_print_header to get a ni...
Definition: u_live_stats.cpp:107
uint64_t values[(1024)]
The values that will be used to calculate statistics.
Definition: u_live_stats.h:49
Helper struct to hold a function pointer and data pointer.
Definition: u_pretty_print.h:49
Pretty printing various Monado things.
Header holding common defines.
#define ARRAY_SIZE(a)
Array size helper.
Definition: xrt_compiler.h:30