mirror of
https://github.com/monero-project/monero.git
synced 2024-10-01 11:49:47 -04:00
daemon: print sampling time in print_net_stats
This commit is contained in:
parent
ec7bba0793
commit
afd002c31f
@ -722,10 +722,11 @@ bool t_rpc_command_executor::print_net_stats()
|
|||||||
uint64_t average = seconds > 0 ? net_stats_res.total_bytes_in / seconds : 0;
|
uint64_t average = seconds > 0 ? net_stats_res.total_bytes_in / seconds : 0;
|
||||||
uint64_t limit = limit_res.limit_down * 1024; // convert to bytes, as limits are always kB/s
|
uint64_t limit = limit_res.limit_down * 1024; // convert to bytes, as limits are always kB/s
|
||||||
double percent = (double)average / (double)limit * 100.0;
|
double percent = (double)average / (double)limit * 100.0;
|
||||||
tools::success_msg_writer() << boost::format("Received %u bytes (%s) in %u packets, average %s/s = %.2f%% of the limit of %s/s")
|
tools::success_msg_writer() << boost::format("Received %u bytes (%s) in %u packets in %s, average %s/s = %.2f%% of the limit of %s/s")
|
||||||
% net_stats_res.total_bytes_in
|
% net_stats_res.total_bytes_in
|
||||||
% tools::get_human_readable_bytes(net_stats_res.total_bytes_in)
|
% tools::get_human_readable_bytes(net_stats_res.total_bytes_in)
|
||||||
% net_stats_res.total_packets_in
|
% net_stats_res.total_packets_in
|
||||||
|
% tools::get_human_readable_timespan(seconds)
|
||||||
% tools::get_human_readable_bytes(average)
|
% tools::get_human_readable_bytes(average)
|
||||||
% percent
|
% percent
|
||||||
% tools::get_human_readable_bytes(limit);
|
% tools::get_human_readable_bytes(limit);
|
||||||
@ -733,10 +734,11 @@ bool t_rpc_command_executor::print_net_stats()
|
|||||||
average = seconds > 0 ? net_stats_res.total_bytes_out / seconds : 0;
|
average = seconds > 0 ? net_stats_res.total_bytes_out / seconds : 0;
|
||||||
limit = limit_res.limit_up * 1024;
|
limit = limit_res.limit_up * 1024;
|
||||||
percent = (double)average / (double)limit * 100.0;
|
percent = (double)average / (double)limit * 100.0;
|
||||||
tools::success_msg_writer() << boost::format("Sent %u bytes (%s) in %u packets, average %s/s = %.2f%% of the limit of %s/s")
|
tools::success_msg_writer() << boost::format("Sent %u bytes (%s) in %u packets in %s, average %s/s = %.2f%% of the limit of %s/s")
|
||||||
% net_stats_res.total_bytes_out
|
% net_stats_res.total_bytes_out
|
||||||
% tools::get_human_readable_bytes(net_stats_res.total_bytes_out)
|
% tools::get_human_readable_bytes(net_stats_res.total_bytes_out)
|
||||||
% net_stats_res.total_packets_out
|
% net_stats_res.total_packets_out
|
||||||
|
% tools::get_human_readable_timespan(seconds)
|
||||||
% tools::get_human_readable_bytes(average)
|
% tools::get_human_readable_bytes(average)
|
||||||
% percent
|
% percent
|
||||||
% tools::get_human_readable_bytes(limit);
|
% tools::get_human_readable_bytes(limit);
|
||||||
|
Loading…
Reference in New Issue
Block a user