From cebef747ef7f2db2b6885ecc90e7d4371b4e49ee Mon Sep 17 00:00:00 2001
From: zzz <zzz@i2pmail.org>
Date: Mon, 12 Apr 2021 10:32:58 -0400
Subject: [PATCH] Transport: Don't update queue size stat unless enabled

---
 .../src/net/i2p/router/transport/FIFOBandwidthRefiller.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/router/java/src/net/i2p/router/transport/FIFOBandwidthRefiller.java b/router/java/src/net/i2p/router/transport/FIFOBandwidthRefiller.java
index 8161dd0746..67ffbdfc59 100644
--- a/router/java/src/net/i2p/router/transport/FIFOBandwidthRefiller.java
+++ b/router/java/src/net/i2p/router/transport/FIFOBandwidthRefiller.java
@@ -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());
     }
 }
-- 
GitLab