Skip to content

Commit

Permalink
Widen the width of the stats column to accommodate max_uint32 ints (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
daxhaw authored Dec 20, 2021
1 parent f313924 commit bcf4ad1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions production/rules/event_manager/inc/rule_stats.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,17 @@ class rule_stats_t
// Row 3 is an individual rule stats row (c_individual_stats_format).
static constexpr uint8_t c_max_rule_id_len = 30;
static constexpr uint8_t c_thread_load_len = 17; // length of [thread load: ...] excluding the percentage
static constexpr uint8_t c_max_row_len = 120;
static constexpr uint8_t c_max_row_len = 150;
static constexpr uint8_t c_count_int_columns = 6;
static constexpr uint8_t c_count_float_columns = 4;
static constexpr uint8_t c_int_width = 6;
static constexpr uint8_t c_int_width = 10;
static constexpr uint8_t c_float_width = 13; // includes len(' ms')

static const char c_truncate_char = '~';
static constexpr uint8_t c_thread_load_padding = c_max_rule_id_len - c_thread_load_len;
static constexpr char c_header_format[] = "{:->{}}{: >6}{: >6}{: >6}{: >6}{: >6}{: >6}{: >13}{: >13}{: >13}{: >13}";
static constexpr char c_individual_stats_format[] = "{: <{}}{:6}{:6}{:6}{:6}{:6}{:6}{:10.2f} ms{:10.2f} ms{:10.2f} ms{:10.2f} ms";
static constexpr char c_cumulative_stats_format[] = "[{}{:{}.2f} %]{:6}{:6}{:6}{:6}{:6}{:6}{:10.2f} ms{:10.2f} ms{:10.2f} ms{:10.2f} ms";
static constexpr char c_header_format[] = "{:->{}}{: >10}{: >10}{: >10}{: >10}{: >10}{: >10}{: >13}{: >13}{: >13}{: >13}";
static constexpr char c_individual_stats_format[] = "{: <{}}{:10}{:10}{:10}{:10}{:10}{:10}{:10.2f} ms{:10.2f} ms{:10.2f} ms{:10.2f} ms";
static constexpr char c_cumulative_stats_format[] = "[{}{:{}.2f} %]{:10}{:10}{:10}{:10}{:10}{:10}{:10.2f} ms{:10.2f} ms{:10.2f} ms{:10.2f} ms";

static constexpr char c_thread_load[] = "thread load: ";

Expand Down

0 comments on commit bcf4ad1

Please sign in to comment.