forked from I2P_Developers/i2p.i2p
add throttle stat
This commit is contained in:
@@ -283,6 +283,7 @@ class EventPumper implements Runnable {
|
|||||||
if (_log.shouldLog(Log.WARN))
|
if (_log.shouldLog(Log.WARN))
|
||||||
_log.warn("EventPumper throttle " + loopCount + " loops in " +
|
_log.warn("EventPumper throttle " + loopCount + " loops in " +
|
||||||
(System.currentTimeMillis() - lastFailsafeIteration) + " ms");
|
(System.currentTimeMillis() - lastFailsafeIteration) + " ms");
|
||||||
|
_context.statManager().addRateData("ntcp.failsafeThrottle", 1);
|
||||||
try {
|
try {
|
||||||
Thread.sleep(25);
|
Thread.sleep(25);
|
||||||
} catch (InterruptedException ie) {}
|
} catch (InterruptedException ie) {}
|
||||||
|
@@ -122,6 +122,7 @@ public class NTCPTransport extends TransportImpl {
|
|||||||
_context.statManager().createRateStat("ntcp.failsafeWrites", "How many times do we need to proactively add in an extra nio write to a peer at any given failsafe pass?", "ntcp", RATES);
|
_context.statManager().createRateStat("ntcp.failsafeWrites", "How many times do we need to proactively add in an extra nio write to a peer at any given failsafe pass?", "ntcp", RATES);
|
||||||
_context.statManager().createRateStat("ntcp.failsafeCloses", "How many times do we need to proactively close an idle connection to a peer at any given failsafe pass?", "ntcp", RATES);
|
_context.statManager().createRateStat("ntcp.failsafeCloses", "How many times do we need to proactively close an idle connection to a peer at any given failsafe pass?", "ntcp", RATES);
|
||||||
_context.statManager().createRateStat("ntcp.failsafeInvalid", "How many times do we close a connection to a peer to work around a JVM bug?", "ntcp", RATES);
|
_context.statManager().createRateStat("ntcp.failsafeInvalid", "How many times do we close a connection to a peer to work around a JVM bug?", "ntcp", RATES);
|
||||||
|
_context.statManager().createRateStat("ntcp.failsafeThrottle", "Delay event pumper", "ntcp", RATES);
|
||||||
_context.statManager().createRateStat("ntcp.accept", "", "ntcp", RATES);
|
_context.statManager().createRateStat("ntcp.accept", "", "ntcp", RATES);
|
||||||
_context.statManager().createRateStat("ntcp.attemptBanlistedPeer", "", "ntcp", RATES);
|
_context.statManager().createRateStat("ntcp.attemptBanlistedPeer", "", "ntcp", RATES);
|
||||||
_context.statManager().createRateStat("ntcp.attemptUnreachablePeer", "", "ntcp", RATES);
|
_context.statManager().createRateStat("ntcp.attemptUnreachablePeer", "", "ntcp", RATES);
|
||||||
@@ -245,7 +246,8 @@ public class NTCPTransport extends TransportImpl {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (isNew) {
|
if (isNew) {
|
||||||
con.send(msg); // doesn't do anything yet, just enqueues it
|
// doesn't do anything yet, just enqueues it
|
||||||
|
con.send(msg);
|
||||||
// As of 0.9.12, don't send our info if the first message is
|
// As of 0.9.12, don't send our info if the first message is
|
||||||
// doing the same (common when connecting to a floodfill).
|
// doing the same (common when connecting to a floodfill).
|
||||||
// Also, put the info message after whatever we are trying to send
|
// Also, put the info message after whatever we are trying to send
|
||||||
|
Reference in New Issue
Block a user