Lines Matching refs:max_used
55 static uint8_t percent_used(uint32_t max_used, uint32_t cap) in percent_used() argument
59 if (max_used == 0) { in percent_used()
63 if (max_used == cap) { in percent_used()
68 percent *= max_used; in percent_used()
75 uint32_t *max_used) in stats_buffer_get_and_clear_max_used() argument
78 *max_used = buffer->max_used; in stats_buffer_get_and_clear_max_used()
79 buffer->max_used = 0; in stats_buffer_get_and_clear_max_used()
97 if (buffer->max_used < length) { in stats_buffer_update_max_used()
98 buffer->max_used = length; in stats_buffer_update_max_used()
105 uint32_t max_used) in stats_buffer_print_to_shell() argument
107 shell_print(sh, "%s: used at most: %u of %u (%u%%)", buffer->name, max_used, in stats_buffer_print_to_shell()
108 buffer->size, percent_used(max_used, buffer->size)); in stats_buffer_print_to_shell()
114 uint32_t max_used; in stats_buffer_shell_cmd_handler() local
127 stats_buffer_get_and_clear_max_used(buffer, &max_used); in stats_buffer_shell_cmd_handler()
128 stats_buffer_print_to_shell(sh, buffer, max_used); in stats_buffer_shell_cmd_handler()
153 buffer->max_used = 0; in modem_stats_buffer_init()