Skip to content

Commit 4573daf

Browse files
committed
#985 update BlockFinalizeTransportStats
1 parent abb367d commit 4573daf

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

chains/Schain.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,19 @@ struct BlockFinalizeTransportStats {
112112
uint64_t tcpClientRequests = 0;
113113
uint64_t zmqServerRequestsServed = 0;
114114
uint64_t tcpServerRequestsServed = 0;
115+
116+
void add( const BlockFinalizeTransportStats& _other ) {
117+
zmqClientAttempts += _other.zmqClientAttempts;
118+
zmqClientFallbacksToTcp += _other.zmqClientFallbacksToTcp;
119+
tcpClientRequests += _other.tcpClientRequests;
120+
zmqServerRequestsServed += _other.zmqServerRequestsServed;
121+
tcpServerRequestsServed += _other.tcpServerRequestsServed;
122+
}
123+
124+
uint64_t totalRequests() const {
125+
return zmqClientAttempts + zmqClientFallbacksToTcp + tcpClientRequests +
126+
zmqServerRequestsServed + tcpServerRequestsServed;
127+
}
115128
};
116129

117130
class Schain : public Agent {

0 commit comments

Comments
 (0)