diff options
| author | Joseph Henry <josephjah@gmail.com> | 2018-06-14 16:48:35 -0700 |
|---|---|---|
| committer | Joseph Henry <josephjah@gmail.com> | 2018-06-14 16:48:35 -0700 |
| commit | 52264d5e284c49817fa0a4dd4f1f0c9feeced41d (patch) | |
| tree | 3d4dccf63294927c5da15bde1f90e36cb395dcd6 /node/Path.hpp | |
| parent | 17fbb020e733fab8d8be933bb4981927015a10f5 (diff) | |
| download | infinitytier-52264d5e284c49817fa0a4dd4f1f0c9feeced41d.tar.gz infinitytier-52264d5e284c49817fa0a4dd4f1f0c9feeced41d.zip | |
Fixed aggregateLinkLatency(). Also changed unit for throughput from byte to bit
Diffstat (limited to 'node/Path.hpp')
| -rw-r--r-- | node/Path.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/node/Path.hpp b/node/Path.hpp index 6162be20..fb202306 100644 --- a/node/Path.hpp +++ b/node/Path.hpp @@ -365,7 +365,7 @@ public: _unackedBytes = (ackedBytes > _unackedBytes) ? 0 : _unackedBytes - ackedBytes; int64_t timeSinceThroughputEstimate = (now - _lastThroughputEstimation); if (timeSinceThroughputEstimate >= ZT_PATH_THROUGHPUT_MEASUREMENT_INTERVAL) { - uint64_t throughput = (float)(_bytesAckedSinceLastThroughputEstimation) / ((float)timeSinceThroughputEstimate / (float)1000); + uint64_t throughput = (float)(_bytesAckedSinceLastThroughputEstimation * 8) / ((float)timeSinceThroughputEstimate / (float)1000); _throughputSamples->push(throughput); _maxLifetimeThroughput = throughput > _maxLifetimeThroughput ? throughput : _maxLifetimeThroughput; _lastThroughputEstimation = now; |
