26 void processStats(
const std::vector<std::shared_ptr<TaraxaPeer>>& all_peers);
38 const std::chrono::system_clock::time_point& start_time)
const;
MAx stats data holder class.
Definition max_stats.hpp:12
Stats single packet type.
Definition packet_stats.hpp:13
Stats for all packet types.
Definition packets_stats.hpp:13
Stats for all received and sent packets of all types.
Definition time_period_packets_stats.hpp:16
void processStats(const std::vector< std::shared_ptr< TaraxaPeer > > &all_peers)
Logs both received as well as sent packets stats + updates max count/size and reset stats.
Definition time_period_packets_stats.cpp:40
logger::Logger logger_
Definition time_period_packets_stats.hpp:51
const std::chrono::milliseconds kResetTimePeriod
Definition time_period_packets_stats.hpp:42
PacketsStats received_packets_stats_
Definition time_period_packets_stats.hpp:46
void addSentPacket(const std::string &packet_type, const dev::p2p::NodeID &node, const PacketStats &packet)
Definition time_period_packets_stats.cpp:19
void addReceivedPacket(const std::string &packet_type, const dev::p2p::NodeID &node, const PacketStats &packet)
Definition time_period_packets_stats.cpp:13
PacketsStats sent_packets_stats_
Definition time_period_packets_stats.hpp:45
std::pair< bool, std::chrono::milliseconds > validMaxStatsTimePeriod(const std::chrono::system_clock::time_point &start_time) const
Checks if now() - start_time is approximately equal to kResetTimePeriod. Stats are reset in regular i...
Definition time_period_packets_stats.cpp:25
MaxStats peer_max_stats_
Definition time_period_packets_stats.hpp:49
std::shared_ptr< spdlog::logger > Logger
Definition logging.hpp:12
Definition vote_manager.hpp:24