forked from I2P_Developers/i2p.i2p
Tunnels: Remove 0 event duration from addRateData() calls
This commit is contained in:
@@ -226,7 +226,7 @@ class BuildExecutor implements Runnable {
|
||||
}
|
||||
}
|
||||
|
||||
_context.statManager().addRateData("tunnel.concurrentBuilds", concurrent, 0);
|
||||
_context.statManager().addRateData("tunnel.concurrentBuilds", concurrent);
|
||||
|
||||
long lag = _context.jobQueue().getMaxLag();
|
||||
if ( (lag > 2000) && (_context.router().getUptime() > 5*60*1000) ) {
|
||||
@@ -420,7 +420,7 @@ class BuildExecutor implements Runnable {
|
||||
continue;
|
||||
}
|
||||
long pTime = System.currentTimeMillis() - bef;
|
||||
_context.statManager().addRateData("tunnel.buildConfigTime", pTime, 0);
|
||||
_context.statManager().addRateData("tunnel.buildConfigTime", pTime);
|
||||
if (_log.shouldLog(Log.DEBUG))
|
||||
_log.debug("Configuring new tunnel " + i + " for " + pool + ": " + cfg);
|
||||
buildTunnel(cfg);
|
||||
@@ -544,7 +544,7 @@ class BuildExecutor implements Runnable {
|
||||
return;
|
||||
if (cfg.getLength() > 1) {
|
||||
long buildTime = System.currentTimeMillis() - beforeBuild;
|
||||
_context.statManager().addRateData("tunnel.buildRequestTime", buildTime, 0);
|
||||
_context.statManager().addRateData("tunnel.buildRequestTime", buildTime);
|
||||
}
|
||||
long id = cfg.getReplyMessageId();
|
||||
if (id > 0) {
|
||||
@@ -649,7 +649,7 @@ class BuildExecutor implements Runnable {
|
||||
if (rv != null) {
|
||||
long requestedOn = rv.getExpiration() - 10*60*1000;
|
||||
long rtt = _context.clock().now() - requestedOn;
|
||||
_context.statManager().addRateData("tunnel.buildReplySlow", rtt, 0);
|
||||
_context.statManager().addRateData("tunnel.buildReplySlow", rtt);
|
||||
if (_log.shouldInfo())
|
||||
_log.info("Got reply late (rtt = " + rtt + ") for: " + rv);
|
||||
}
|
||||
|
||||
@@ -541,7 +541,7 @@ abstract class BuildRequestor {
|
||||
public void runJob() {
|
||||
_exec.buildComplete(_cfg, OTHER_FAILURE);
|
||||
getContext().profileManager().tunnelTimedOut(_cfg.getPeer(1));
|
||||
getContext().statManager().addRateData("tunnel.buildFailFirstHop", 1, 0);
|
||||
getContext().statManager().addRateData("tunnel.buildFailFirstHop", 1);
|
||||
// static, no _log
|
||||
//System.err.println("Cant contact first hop for " + _cfg);
|
||||
}
|
||||
|
||||
@@ -616,7 +616,7 @@ public class TunnelPool {
|
||||
long et = now - _lastRateUpdate;
|
||||
if (et > 2*60*1000) {
|
||||
long bw = 1024 * (_lifetimeProcessed - _lastLifetimeProcessed) * 1000 / et; // Bps
|
||||
_context.statManager().addRateData(_rateName, bw, 0);
|
||||
_context.statManager().addRateData(_rateName, bw);
|
||||
_lastRateUpdate = now;
|
||||
_lastLifetimeProcessed = _lifetimeProcessed;
|
||||
}
|
||||
@@ -969,7 +969,7 @@ public class TunnelPool {
|
||||
+ " soon " + expireSoon + " later " + expireLater
|
||||
+ " std " + wanted + " inProgress " + inProgress + " fallback " + fallback
|
||||
+ " for " + toString());
|
||||
_context.statManager().addRateData(rateName, rv + inProgress, 0);
|
||||
_context.statManager().addRateData(rateName, rv + inProgress);
|
||||
return rv;
|
||||
}
|
||||
|
||||
@@ -1022,7 +1022,7 @@ public class TunnelPool {
|
||||
|
||||
int rv = countHowManyToBuild(allowZeroHop, expire30s, expire90s, expire150s, expire210s, expire270s,
|
||||
expireLater, wanted, inProgress, fallback);
|
||||
_context.statManager().addRateData(rateName, (rv > 0 || inProgress > 0) ? 1 : 0, 0);
|
||||
_context.statManager().addRateData(rateName, (rv > 0 || inProgress > 0) ? 1 : 0);
|
||||
return rv;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user