Skip to content

Commit

Permalink
Stats
Browse files Browse the repository at this point in the history
  • Loading branch information
pwojcikdev committed May 26, 2024
1 parent 32ddebd commit c438b02
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions nano/lib/stats_enums.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ enum class type
aggregator,
requests,
request_aggregator,
request_aggregator_vote,
filter,
telemetry,
vote_generator,
Expand Down Expand Up @@ -323,6 +324,7 @@ enum class detail
requests_cannot_vote,
requests_unknown,
requests_non_final,
requests_final,

// request_aggregator
request_hashes,
Expand Down
5 changes: 3 additions & 2 deletions nano/node/request_aggregator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,15 +268,16 @@ auto nano::request_aggregator::aggregate (nano::secure::transaction const & tran
if (generate_final_vote)
{
to_generate_final.push_back (block);
stats.inc (nano::stat::type::requests, nano::stat::detail::requests_final);
}
else
{
stats.inc (nano::stat::type::requests, nano::stat::detail::requests_non_final, stat::dir::in);
stats.inc (nano::stat::type::requests, nano::stat::detail::requests_non_final);
}
}
else
{
stats.inc (nano::stat::type::requests, nano::stat::detail::requests_unknown, stat::dir::in);
stats.inc (nano::stat::type::requests, nano::stat::detail::requests_unknown);
}
}

Expand Down

0 comments on commit c438b02

Please sign in to comment.