diff --git a/nano/lib/stats.hpp b/nano/lib/stats.hpp index e644658051..6faca397b7 100644 --- a/nano/lib/stats.hpp +++ b/nano/lib/stats.hpp @@ -224,9 +224,8 @@ class stats final /** * Initialize stats with a config. - * @param config Configuration object; deserialized from config.json */ - stats (nano::stats_config config); + explicit stats (nano::stats_config); /** * Call this to override the default sample interval and capacity, for a specific stat entry. @@ -252,18 +251,18 @@ class stats final add (type, dir, 1); } - /** Increments the counter for \detail, but doesn't update at the type level */ - void inc_detail_only (stat::type type, stat::detail detail, stat::dir dir = stat::dir::in) - { - add (type, detail, dir, 1, true); - } - /** Increments the given counter */ void inc (stat::type type, stat::detail detail, stat::dir dir = stat::dir::in) { add (type, detail, dir, 1); } + /** Adds \p value to the given counter */ + void add (stat::type type, stat::detail detail, uint64_t value) + { + add (type, detail, stat::dir::in, value); + } + /** Adds \p value to the given counter */ void add (stat::type type, stat::dir dir, uint64_t value) {