Add pull request failure to stats (#1955)
This commit is contained in:
parent
74843b8f4c
commit
b2e33bc48b
3 changed files with 28 additions and 1 deletions
|
@ -459,6 +459,7 @@ void nano::bulk_pull_client::request ()
|
|||
{
|
||||
this_l->connection->node->logger.try_log (boost::str (boost::format ("Error sending bulk pull request to %1%: to %2%") % ec.message () % this_l->connection->channel->to_string ()));
|
||||
}
|
||||
this_l->connection->node->stats.inc (nano::stat::type::bootstrap, nano::stat::detail::bulk_pull_request_failure, nano::stat::dir::in);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -477,6 +478,7 @@ void nano::bulk_pull_client::receive_block ()
|
|||
{
|
||||
this_l->connection->node->logger.try_log (boost::str (boost::format ("Error receiving block type: %1%") % ec.message ()));
|
||||
}
|
||||
this_l->connection->node->stats.inc (nano::stat::type::bootstrap, nano::stat::detail::bulk_pull_receive_block_failure, nano::stat::dir::in);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -605,6 +607,7 @@ void nano::bulk_pull_client::received_block (boost::system::error_code const & e
|
|||
{
|
||||
connection->node->logger.try_log ("Error deserializing block received from pull request");
|
||||
}
|
||||
connection->node->stats.inc (nano::stat::type::bootstrap, nano::stat::detail::bulk_pull_deserialize_receive_block, nano::stat::dir::in);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -613,6 +616,7 @@ void nano::bulk_pull_client::received_block (boost::system::error_code const & e
|
|||
{
|
||||
connection->node->logger.try_log (boost::str (boost::format ("Error bulk receiving block: %1%") % ec.message ()));
|
||||
}
|
||||
connection->node->stats.inc (nano::stat::type::bootstrap, nano::stat::detail::bulk_pull_receive_block_failure, nano::stat::dir::in);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -777,6 +781,7 @@ void nano::bulk_pull_account_client::request ()
|
|||
{
|
||||
this_l->connection->node->logger.try_log (boost::str (boost::format ("Error starting bulk pull request to %1%: to %2%") % ec.message () % this_l->connection->channel->to_string ()));
|
||||
}
|
||||
this_l->connection->node->stats.inc (nano::stat::type::bootstrap, nano::stat::detail::bulk_pull_error_starting_request, nano::stat::dir::in);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -1348,6 +1353,8 @@ void nano::bootstrap_attempt::requeue_pull (nano::pull_info const & pull_a)
|
|||
{
|
||||
node->logger.try_log (boost::str (boost::format ("Failed to pull account %1% down to %2% after %3% attempts and %4% blocks processed") % pull.account.to_account () % pull.end.to_string () % pull.attempts % pull.processed));
|
||||
}
|
||||
node->stats.inc (nano::stat::type::bootstrap, nano::stat::detail::bulk_pull_failed_account, nano::stat::dir::in);
|
||||
|
||||
node->bootstrap_initiator.cache.add (pull);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -388,6 +388,21 @@ std::string nano::stat::detail_to_string (uint32_t key)
|
|||
case nano::stat::detail::bulk_pull_account:
|
||||
res = "bulk_pull_account";
|
||||
break;
|
||||
case nano::stat::detail::bulk_pull_deserialize_receive_block:
|
||||
res = "bulk_pull_deserialize_receive_block";
|
||||
break;
|
||||
case nano::stat::detail::bulk_pull_error_starting_request:
|
||||
res = "bulk_pull_error_starting_request";
|
||||
break;
|
||||
case nano::stat::detail::bulk_pull_failed_account:
|
||||
res = "bulk_pull_failed_account";
|
||||
break;
|
||||
case nano::stat::detail::bulk_pull_receive_block_failure:
|
||||
res = "bulk_pull_receive_block_failure";
|
||||
break;
|
||||
case nano::stat::detail::bulk_pull_request_failure:
|
||||
res = "bulk_pull_request_failure";
|
||||
break;
|
||||
case nano::stat::detail::bulk_push:
|
||||
res = "bulk_push";
|
||||
break;
|
||||
|
|
|
@ -267,8 +267,13 @@ public:
|
|||
|
||||
// bootstrap specific
|
||||
bulk_pull,
|
||||
bulk_push,
|
||||
bulk_pull_account,
|
||||
bulk_pull_deserialize_receive_block,
|
||||
bulk_pull_error_starting_request,
|
||||
bulk_pull_failed_account,
|
||||
bulk_pull_receive_block_failure,
|
||||
bulk_pull_request_failure,
|
||||
bulk_push,
|
||||
frontier_req,
|
||||
error_socket_close,
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue