From 63ec19674c423b3d93185a690cff3f355c8d9c17 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Tue, 19 Mar 2019 16:43:43 -0700 Subject: . --- node/Node.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'node/Node.hpp') diff --git a/node/Node.hpp b/node/Node.hpp index c3e46deb..a6f92eb1 100644 --- a/node/Node.hpp +++ b/node/Node.hpp @@ -273,6 +273,12 @@ public: return false; } + inline void statsLogVerb(const unsigned int v,const unsigned int bytes) + { + ++_stats.inVerbCounts[v]; + _stats.inVerbBytes[v] += (uint64_t)bytes; + } + private: RuntimeEnvironment _RR; RuntimeEnvironment *RR; @@ -286,6 +292,9 @@ private: // Time of last identity verification indexed by InetAddress.rateGateHash() -- used in IncomingPacket::_doHELLO() via rateGateIdentityVerification() int64_t _lastIdentityVerification[16384]; + // Statistics about stuff happening + volatile ZT_NodeStatistics _stats; + // Map that remembers if we have recently sent a network config to someone // querying us as a controller. struct _LocalControllerAuth -- cgit v1.2.3