summaryrefslogtreecommitdiff
path: root/node/Path.hpp
diff options
context:
space:
mode:
authorJoseph Henry <josephjah@gmail.com>2018-06-13 14:50:37 -0700
committerJoseph Henry <josephjah@gmail.com>2018-06-13 14:50:37 -0700
commitf8005b88adfe93af477528bec748882da8fa9bea (patch)
tree6c7390e572483b9e0bb8c1ab9923e84ab3478e6d /node/Path.hpp
parent0faa655b834be45d379c84769604b5c43f734650 (diff)
downloadinfinitytier-f8005b88adfe93af477528bec748882da8fa9bea.tar.gz
infinitytier-f8005b88adfe93af477528bec748882da8fa9bea.zip
Minor cleanup. More efficient push() operation for RingBuffer
Diffstat (limited to 'node/Path.hpp')
-rw-r--r--node/Path.hpp7
1 files changed, 0 insertions, 7 deletions
diff --git a/node/Path.hpp b/node/Path.hpp
index e0426323..30655877 100644
--- a/node/Path.hpp
+++ b/node/Path.hpp
@@ -161,11 +161,9 @@ public:
{
delete _throughputSamples;
delete _latencySamples;
- delete _qualitySamples;
delete _packetValiditySamples;
_throughputSamples = NULL;
_latencySamples = NULL;
- _qualitySamples = NULL;
_packetValiditySamples = NULL;
}
@@ -580,7 +578,6 @@ public:
* @param now Current time
*/
inline void processBackgroundPathMeasurements(int64_t now, const int64_t peerId) {
- // Compute path stability
if (now - _lastPathQualityComputeTime > ZT_PATH_QUALITY_COMPUTE_INTERVAL) {
Mutex::Lock _l(_statistics_m);
_lastPathQualityComputeTime = now;
@@ -606,8 +603,6 @@ public:
// Compute the quality product
_lastComputedStability = pdv_contrib + latency_contrib + throughput_disturbance_contrib;
_lastComputedStability *= 1 - _packetErrorRatio;
- _qualitySamples->push(_lastComputedStability);
-
// Prevent QoS records from sticking around for too long
std::map<uint64_t,uint64_t>::iterator it = _outQoSRecords.begin();
while (it != _outQoSRecords.end()) {
@@ -650,7 +645,6 @@ public:
inline void prepareBuffers() {
_throughputSamples = new RingBuffer<uint64_t>(ZT_PATH_QUALITY_METRIC_WIN_SZ);
_latencySamples = new RingBuffer<uint32_t>(ZT_PATH_QUALITY_METRIC_WIN_SZ);
- _qualitySamples = new RingBuffer<float>(ZT_PATH_QUALITY_METRIC_WIN_SZ);
_packetValiditySamples = new RingBuffer<bool>(ZT_PATH_QUALITY_METRIC_WIN_SZ);
memset(_ifname, 0, 16);
memset(_addrString, 0, sizeof(_addrString));
@@ -704,7 +698,6 @@ private:
RingBuffer<uint64_t> *_throughputSamples;
RingBuffer<uint32_t> *_latencySamples;
- RingBuffer<float> *_qualitySamples;
RingBuffer<bool> *_packetValiditySamples;
};