aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp/stats/stat_segment.h
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2019-02-22 05:05:53 -0800
committerDamjan Marion <dmarion@me.com>2019-02-22 20:44:21 +0000
commitd2bbdef69429ccfaf8c4c508f3e2b3fa9bb8e8d1 (patch)
tree7d6e7077f0a99bec249192a418e04cc61c92c299 /src/vpp/stats/stat_segment.h
parent2a3f6d158803c5031d4bcc95dfa02a412bca08b6 (diff)
stats: add buffer gauges
Change-Id: I7f7a459f25d64ea5fa36e30d7dccc667bc19c5a9 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'src/vpp/stats/stat_segment.h')
-rw-r--r--src/vpp/stats/stat_segment.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/vpp/stats/stat_segment.h b/src/vpp/stats/stat_segment.h
index 3ce82809255..f3ea50c9d99 100644
--- a/src/vpp/stats/stat_segment.h
+++ b/src/vpp/stats/stat_segment.h
@@ -85,8 +85,13 @@ stat_segment_pointer (void *start, uint64_t offset)
return ((char *) start + offset);
}
+typedef void (*stat_segment_update_fn)(stat_segment_directory_entry_t * e);
+
typedef struct
{
+ /* internal, does not point to shared memory */
+ stat_segment_update_fn *gauges_fns;
+
/* statistics segment */
uword *directory_vector_by_name;
stat_segment_directory_entry_t *directory_vector;
@@ -104,4 +109,7 @@ typedef struct
extern stat_segment_main_t stat_segment_main;
+clib_error_t *
+stat_segment_register_gauge (u8 *names, stat_segment_update_fn update_fn);
+
#endif