Transport: Don't update queue size stat unless enabled

This commit is contained in:
zzz
2021-04-12 10:32:58 -04:00
parent 76fd180b63
commit cebef747ef

View File

@@ -351,12 +351,14 @@ public class FIFOBandwidthRefiller implements Runnable {
}
/**
* Run once every replenish period
* Call a few times a minute to update the stats
*
* @since 0.8.12
*/
private void updateParticipating(long now) {
_context.statManager().addRateData("tunnel.participatingBandwidthOut", getCurrentParticipatingBandwidth());
_context.statManager().addRateData("bwLimiter.participatingBandwidthQueue", (long) _partBWE.getQueueSizeEstimate());
// this one is not a required stat
if (_context.getBooleanProperty("stat.full"))
_context.statManager().addRateData("bwLimiter.participatingBandwidthQueue", (long) _partBWE.getQueueSizeEstimate());
}
}