aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib
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
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')
-rw-r--r--src/vlib/counter.c11
-rw-r--r--src/vlib/error.c2
2 files changed, 7 insertions, 6 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
diff --git a/src/vlib/error.c b/src/vlib/error.c
index 3ea62e586ba..aa53324fa8f 100644
--- a/src/vlib/error.c
+++ b/src/vlib/error.c
@@ -208,7 +208,7 @@ vlib_register_errors (vlib_main_t * vm,
for (i = 0; i < n_errors; i++)
{
- error_name = format (0, "/err/%s/%s%c", n->name, error_strings[i], 0);
+ error_name = format (0, "/err/%v/%s%c", n->name, error_strings[i], 0);
/* Note: error_name consumed by the following call */
vlib_stats_register_error_index (error_name, n->error_heap_index + i);
}