Skip to content

Commit

Permalink
Missing override & smaller improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
pwojcikdev committed Feb 10, 2024
1 parent c5926cb commit 9266491
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions nano/lib/stats.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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)
{
Expand Down

0 comments on commit 9266491

Please sign in to comment.