summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vpp/stats/stat_segment.c7
-rw-r--r--src/vpp/stats/stats.h1
2 files changed, 7 insertions, 1 deletions
diff --git a/src/vpp/stats/stat_segment.c b/src/vpp/stats/stat_segment.c
index 72333746fbd..29b3bf3812d 100644
--- a/src/vpp/stats/stat_segment.c
+++ b/src/vpp/stats/stat_segment.c
@@ -510,7 +510,8 @@ do_stat_segment_updates (stats_main_t * sm)
sm->last_runtime_stats_clear_ptr[0] =
vm->node_main.time_last_runtime_stats_clear;
- update_serialized_nodes (sm);
+ if (sm->serialize_nodes)
+ update_serialized_nodes (sm);
}
static clib_error_t *
@@ -523,6 +524,10 @@ statseg_config (vlib_main_t * vm, unformat_input_t * input)
{
if (unformat (input, "size %U", unformat_memory_size, &sm->memory_size))
;
+ else if (unformat (input, "serialize-nodes on"))
+ sm->serialize_nodes = 1;
+ else if (unformat (input, "serialize-nodes off"))
+ sm->serialize_nodes = 0;
else
return clib_error_return (0, "unknown input `%U'",
format_unformat_error, input);
diff --git a/src/vpp/stats/stats.h b/src/vpp/stats/stats.h
index bb4cbebe035..aea2da7a2c2 100644
--- a/src/vpp/stats/stats.h
+++ b/src/vpp/stats/stats.h
@@ -168,6 +168,7 @@ typedef struct
clib_socket_t *socket;
u8 *socket_name;
uword memory_size;
+ u8 serialize_nodes;
/* Pointers to scalar stats maintained by the stat thread */
f64 *input_rate_ptr;