Monado OpenXR Runtime
|
Struct to do live statistic tracking and printing of nano-seconds values, used by amongst other the compositor pacing code. More...
#include <util/u_live_stats.h>
Public Member Functions | |
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. More... | |
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. More... | |
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 nice header to the values. More... | |
Static Public Member Functions | |
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 adding the value. More... | |
Data Fields | |
char | name [(16)] |
Small name used for printing. More... | |
uint32_t | value_count |
Number of values currently in struct. More... | |
uint64_t | values [(1024)] |
The values that will be used to calculate statistics. More... | |
Struct to do live statistic tracking and printing of nano-seconds values, used by amongst other the compositor pacing code.
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.
References value_count, and values.
Referenced by u_ls_ns_print_and_reset().
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 nice header to the values.
Doesn't include any newlines.
References name, u_ls_ns_get_and_reset(), and u_pp().
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.
Doesn't include any newlines.
References u_pp().
char u_live_stats_ns::name[(16)] |
Small name used for printing.
Referenced by ipcproto.common.Arg::__init__(), ipcproto.common.Call::__init__(), bindings.Profile::__init__(), ipcproto.common.Arg::dump(), ipcproto.common.Call::dump(), ipcproto.common.Arg::get_func_argument_in(), ipcproto.common.Arg::get_func_argument_out(), ipcproto.common.Arg::get_struct_field(), u_ls_ns_print_and_reset(), ipcproto.common.Call::write_call_decl(), ipcproto.common.Call::write_handler_decl(), ipcproto.common.Call::write_receive_decl(), and ipcproto.common.Call::write_send_decl().
uint32_t u_live_stats_ns::value_count |
Number of values currently in struct.
Referenced by u_ls_ns_add(), and u_ls_ns_get_and_reset().
uint64_t u_live_stats_ns::values[(1024)] |
The values that will be used to calculate statistics.
Referenced by u_ls_ns_add(), and u_ls_ns_get_and_reset().