summaryrefslogtreecommitdiffstats
path: root/src/vlib/counter.c
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2018-08-23 13:00:53 +0200
committerDamjan Marion <dmarion@me.com>2018-08-29 09:39:38 +0000
commit2fee16787ed0d622631223567635a77e14c8c076 (patch)
treeaab9492cc925b7cfa769d996fd6fbbf1d0506971 /src/vlib/counter.c
parentfcf9497d3bcd34b8b5090ee053575296cf56c5e6 (diff)
STATS: stat_client updates.
New stat segment client library: vpp-api/client/stat_client.h New stat segment query app: vpp_get_stats [ls | dump | poll ] <pattern ...> Prometheus integration through: vpp_prometheus_export <pattern> Change-Id: I6f370cf599e9fcf066f22965a62d3a8acd529994 Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'src/vlib/counter.c')
-rw-r--r--src/vlib/counter.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/vlib/counter.c b/src/vlib/counter.c
index 29cd004fc3e..6afa73e0a7d 100644
--- a/src/vlib/counter.c
+++ b/src/vlib/counter.c
@@ -81,13 +81,12 @@ vlib_stats_push_heap (void)
return 0;
};
-void vlib_stats_pop_heap (void *, void *) __attribute__ ((weak));
+void vlib_stats_pop_heap (void *, void *, int) __attribute__ ((weak));
void
-vlib_stats_pop_heap (void *notused, void *notused2)
+vlib_stats_pop_heap (void *notused, void *notused2, int type)
{
};
-
void
vlib_validate_simple_counter (vlib_simple_counter_main_t * cm, u32 index)
{
@@ -99,7 +98,8 @@ vlib_validate_simple_counter (vlib_simple_counter_main_t * cm, u32 index)
for (i = 0; i < tm->n_vlib_mains; i++)
vec_validate_aligned (cm->counters[i], index, CLIB_CACHE_LINE_BYTES);
- vlib_stats_pop_heap (cm, oldheap);
+ vlib_stats_pop_heap (cm, oldheap,
+ 3 /* STAT_DIR_TYPE_COUNTER_VECTOR_SIMPLE */ );
}
void
@@ -113,7 +113,8 @@ vlib_validate_combined_counter (vlib_combined_counter_main_t * cm, u32 index)
for (i = 0; i < tm->n_vlib_mains; i++)
vec_validate_aligned (cm->counters[i], index, CLIB_CACHE_LINE_BYTES);
- vlib_stats_pop_heap (cm, oldheap);
+ vlib_stats_pop_heap (cm, oldheap,
+ 4 /*STAT_DIR_TYPE_COUNTER_VECTOR_COMBINED */ );
}
u32