MINOR: stats: support clear counters for dynamic stats

Add a boolean 'clearable' on stats module structure. If set, it forces
all the counters to be reset on 'clear counters' cli command. If not,
the counters are reset only when 'clear counters all' is used.
This commit is contained in:
Amaury Denoyelle
2020-10-05 11:49:43 +02:00
committed by Christopher Faulet
parent ee63d4bd67
commit d3700a7fda
2 changed files with 43 additions and 0 deletions

View File

@@ -477,6 +477,7 @@ struct stats_module {
size_t counters_size; /* sizeof counters */
uint32_t domain_flags; /* stats application domain for this module */
char clearable; /* reset on a clear counters */
};
struct extra_counters {