diff options
Diffstat (limited to 'src/vlib/stats/stats.h')
-rw-r--r-- | src/vlib/stats/stats.h | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/src/vlib/stats/stats.h b/src/vlib/stats/stats.h index 09a9aef002d..5f5581ca62b 100644 --- a/src/vlib/stats/stats.h +++ b/src/vlib/stats/stats.h @@ -21,25 +21,12 @@ typedef enum { STAT_COUNTER_HEARTBEAT = 0, STAT_COUNTER_LAST_STATS_CLEAR, - STAT_COUNTER_NODE_CLOCKS, - STAT_COUNTER_NODE_VECTORS, - STAT_COUNTER_NODE_CALLS, - STAT_COUNTER_NODE_SUSPENDS, - STAT_COUNTER_NODE_NAMES, STAT_COUNTERS } stat_segment_counter_t; -#define foreach_stat_segment_node_counter_name \ - _ (NODE_CLOCKS, COUNTER_VECTOR_SIMPLE, clocks, "/sys/node") \ - _ (NODE_VECTORS, COUNTER_VECTOR_SIMPLE, vectors, "/sys/node") \ - _ (NODE_CALLS, COUNTER_VECTOR_SIMPLE, calls, "/sys/node") \ - _ (NODE_SUSPENDS, COUNTER_VECTOR_SIMPLE, suspends, "/sys/node") - #define foreach_stat_segment_counter_name \ _ (LAST_STATS_CLEAR, SCALAR_INDEX, last_stats_clear, "/sys") \ - _ (HEARTBEAT, SCALAR_INDEX, heartbeat, "/sys") \ - _ (NODE_NAMES, NAME_VECTOR, names, "/sys/node") \ - foreach_stat_segment_node_counter_name + _ (HEARTBEAT, SCALAR_INDEX, heartbeat, "/sys") typedef struct { @@ -76,7 +63,6 @@ typedef struct uword *directory_vector_by_name; vlib_stats_entry_t *directory_vector; u32 dir_vector_first_free_elt; - u8 **nodes; /* Update interval */ f64 update_interval; @@ -98,6 +84,11 @@ typedef struct typedef struct { + u32 entry_index; +} vlib_stats_header_t; + +typedef struct +{ vlib_stats_segment_t segment; } vlib_stats_main_t; @@ -149,8 +140,9 @@ u32 vlib_stats_add_counter_vector (char *fmt, ...); u32 vlib_stats_add_counter_pair_vector (char *fmt, ...); /* string vector */ -u32 vlib_stats_add_string_vector (char *fmt, ...); -void vlib_stats_set_string_vector (u32 entry_index, u32 vector_index, +typedef u8 **vlib_stats_string_vector_t; +vlib_stats_string_vector_t vlib_stats_add_string_vector (char *fmt, ...); +void vlib_stats_set_string_vector (vlib_stats_string_vector_t *sv, u32 index, char *fmt, ...); /* symlink */ |