mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
More overlay stats
This commit is contained in:
parent
70322f58c1
commit
a14490637a
4 changed files with 27 additions and 6 deletions
|
@ -726,6 +726,10 @@ void OverlayImpl::get_stats(td::Promise<tl_object_ptr<ton_api::engine_validator_
|
|||
node_obj->bdcst_errors_ = peer.broadcast_errors;
|
||||
node_obj->fec_bdcst_errors_ = peer.fec_broadcast_errors;
|
||||
|
||||
node_obj->is_neighbour_ = peer.is_neighbour();
|
||||
node_obj->is_alive_ = peer.is_alive();
|
||||
node_obj->node_flags_ = peer.get_node()->flags();
|
||||
|
||||
res->nodes_.push_back(std::move(node_obj));
|
||||
});
|
||||
|
||||
|
|
|
@ -693,7 +693,8 @@ engine.validator.proposalVote perm_key:int256 to_send:bytes = engine.validator.P
|
|||
engine.validator.dhtServerStatus id:int256 status:int = engine.validator.DhtServerStatus;
|
||||
engine.validator.dhtServersStatus servers:(vector engine.validator.dhtServerStatus) = engine.validator.DhtServersStatus;
|
||||
|
||||
engine.validator.overlayStatsNode adnl_id:int256 ip_addr:string bdcst_errors:int fec_bdcst_errors:int last_in_query:int last_out_query:int t_out_bytes:int t_in_bytes:int t_out_pckts:int t_in_pckts:int = engine.validator.OverlayStatsNode;
|
||||
engine.validator.overlayStatsNode adnl_id:int256 ip_addr:string is_neighbour:Bool is_alive:Bool node_flags:int
|
||||
bdcst_errors:int fec_bdcst_errors:int last_in_query:int last_out_query:int t_out_bytes:int t_in_bytes:int t_out_pckts:int t_in_pckts:int = engine.validator.OverlayStatsNode;
|
||||
|
||||
engine.validator.overlayStats overlay_id:int256 overlay_id_full:PublicKey adnl_id:int256 scope:string nodes:(vector engine.validator.overlayStatsNode) stats:(vector engine.validator.oneStat) extra:string = engine.validator.OverlayStats;
|
||||
engine.validator.overlaysStats overlays:(vector engine.validator.overlayStats) = engine.validator.OverlaysStats;
|
||||
|
|
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
This file is part of TON Blockchain source code.
|
||||
|
||||
TON Blockchain is free software; you can redistribute it and/or
|
||||
|
@ -910,8 +910,22 @@ td::Status GetOverlaysStatsJsonQuery::receive(td::BufferSlice data) {
|
|||
} else {
|
||||
tail = true;
|
||||
}
|
||||
|
||||
sb << " {\n \"adnl_id\": \"" << n->adnl_id_ << "\",\n \"ip_addr\": \"" << n->ip_addr_ << "\",\n \"broadcast_errors\": " << n->bdcst_errors_ << ",\n \"fec_broadcast_errors\": " << n->fec_bdcst_errors_ << ",\n \"last_in_query_unix\": " << n->last_in_query_ << ",\n \"last_in_query_human\": \"" << time_to_human(n->last_in_query_) << "\",\n" << " \"last_out_query_unix\": " << n->last_out_query_ << ",\n \"last_out_query_human\": \"" << time_to_human(n->last_out_query_) << "\",\n" << "\n \"throughput\": { \"out_bytes_sec\": " << n->t_out_bytes_ << ", \"out_pckts_sec\": " << n->t_out_pckts_ << ", \"in_bytes_sec\": " << n->t_in_bytes_ << ", \"in_pckts_sec\": " << n->t_in_pckts_ << " }\n }";
|
||||
|
||||
sb << " {\n";
|
||||
sb << R"( "adnl_id": ")" << n->adnl_id_ << "\",\n";
|
||||
sb << R"( "ip_addr": ")" << n->ip_addr_ << "\",\n";
|
||||
sb << R"( "is_neighbour": )" << (n->is_neighbour_ ? "true" : "false") << ",\n";
|
||||
sb << R"( "is_alive": )" << (n->is_alive_ ? "true" : "false") << ",\n";
|
||||
sb << R"( "node_flags": )" << n->node_flags_ << ",\n";
|
||||
sb << R"( "broadcast_errors": )" << n->bdcst_errors_ << ",\n";
|
||||
sb << R"( "fec_broadcast_errors": )" << n->fec_bdcst_errors_ << ",\n";
|
||||
sb << R"( "last_in_query_unix": )" << n->last_in_query_ << ",\n";
|
||||
sb << R"( "last_in_query_human": ")" << time_to_human(n->last_in_query_) << "\",\n";
|
||||
sb << R"( "last_out_query_unix": )" << n->last_out_query_ << ",\n";
|
||||
sb << R"( "last_out_query_human": ")" << time_to_human(n->last_out_query_) << "\",\n\n";
|
||||
sb << R"( "throughput": { "out_bytes_sec": )" << n->t_out_bytes_ << R"(, "out_pckts_sec": )" << n->t_out_pckts_
|
||||
<< R"(, "in_bytes_sec": )" << n->t_in_bytes_ << R"(, "in_pckts_sec": )" << n->t_in_pckts_ << " }\n";
|
||||
sb << " }";
|
||||
|
||||
overlay_t_out_bytes += n->t_out_bytes_;
|
||||
overlay_t_out_pckts += n->t_out_pckts_;
|
||||
|
@ -920,8 +934,10 @@ td::Status GetOverlaysStatsJsonQuery::receive(td::BufferSlice data) {
|
|||
overlay_t_in_pckts += n->t_in_pckts_;
|
||||
}
|
||||
sb << " ],\n";
|
||||
|
||||
sb << " \"total_throughput\": { \"out_bytes_sec\": " << overlay_t_out_bytes << ", \"out_pckts_sec\": " << overlay_t_out_pckts << ", \"in_bytes_sec\": " << overlay_t_in_bytes << ", \"in_pckts_sec\": " << overlay_t_in_pckts << " },\n";
|
||||
|
||||
sb << " \"total_throughput\": { \"out_bytes_sec\": " << overlay_t_out_bytes
|
||||
<< ", \"out_pckts_sec\": " << overlay_t_out_pckts << ", \"in_bytes_sec\": " << overlay_t_in_bytes
|
||||
<< ", \"in_pckts_sec\": " << overlay_t_in_pckts << " },\n";
|
||||
|
||||
sb << " \"stats\": {\n";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue