- Job Queue/stats: add stat/graph for amount of scheduled jobs (router.tunnelBacklog)

- FloodfillMonitorJob:
  - Use avg of router.tunnelBacklog instead of current backlog
- Some language/spelling fixes
This commit is contained in:
dg2-new
2015-05-12 18:46:40 +00:00
parent 287862887d
commit 8303016b48
22 changed files with 28 additions and 22 deletions

View File

@ -26,7 +26,7 @@ then
fi fi
# on windows, one must specify the path of commnad find # on windows, one must specify the path of commnad find
# since windows has its own retarded version of find. # since windows has its own version of find.
if which find|grep -q -i windows ; then if which find|grep -q -i windows ; then
export PATH=.:/bin:/usr/local/bin:$PATH export PATH=.:/bin:/usr/local/bin:$PATH
fi fi

View File

@ -25,7 +25,7 @@ then
fi fi
# on windows, one must specify the path of commnad find # on windows, one must specify the path of commnad find
# since windows has its own retarded version of find. # since windows has its own version of find.
if which find|grep -q -i windows ; then if which find|grep -q -i windows ; then
export PATH=.:/bin:/usr/local/bin:$PATH export PATH=.:/bin:/usr/local/bin:$PATH
fi fi

View File

@ -25,7 +25,7 @@ then
fi fi
# on windows, one must specify the path of commnad find # on windows, one must specify the path of commnad find
# since windows has its own retarded version of find. # since windows has its own version of find.
if which find|grep -q -i windows ; then if which find|grep -q -i windows ; then
export PATH=.:/bin:/usr/local/bin:$PATH export PATH=.:/bin:/usr/local/bin:$PATH
fi fi

View File

@ -24,7 +24,7 @@ then
fi fi
# on windows, one must specify the path of commnad find # on windows, one must specify the path of commnad find
# since windows has its own retarded version of find. # since windows has its own version of find.
if which find|grep -q -i windows ; then if which find|grep -q -i windows ; then
export PATH=.:/bin:/usr/local/bin:$PATH export PATH=.:/bin:/usr/local/bin:$PATH
fi fi

View File

@ -25,7 +25,7 @@ then
fi fi
# on windows, one must specify the path of commnad find # on windows, one must specify the path of commnad find
# since windows has its own retarded version of find. # since windows has its own version of find.
if which find|grep -q -i windows ; then if which find|grep -q -i windows ; then
export PATH=.:/bin:/usr/local/bin:$PATH export PATH=.:/bin:/usr/local/bin:$PATH
fi fi

View File

@ -25,7 +25,7 @@ then
fi fi
# on windows, one must specify the path of commnad find # on windows, one must specify the path of commnad find
# since windows has its own retarded version of find. # since windows has its own version of find.
if which find|grep -q -i windows ; then if which find|grep -q -i windows ; then
export PATH=.:/bin:/usr/local/bin:$PATH export PATH=.:/bin:/usr/local/bin:$PATH
fi fi

View File

@ -25,7 +25,7 @@ then
fi fi
# on windows, one must specify the path of commnad find # on windows, one must specify the path of commnad find
# since windows has its own retarded version of find. # since windows has its own version of find.
if which find|grep -q -i windows ; then if which find|grep -q -i windows ; then
export PATH=.:/bin:/usr/local/bin:$PATH export PATH=.:/bin:/usr/local/bin:$PATH
fi fi

View File

@ -25,7 +25,7 @@ then
fi fi
# on windows, one must specify the path of commnad find # on windows, one must specify the path of commnad find
# since windows has its own retarded version of find. # since windows has its own version of find.
if which find|grep -q -i windows ; then if which find|grep -q -i windows ; then
export PATH=.:/bin:/usr/local/bin:$PATH export PATH=.:/bin:/usr/local/bin:$PATH
fi fi

View File

@ -1173,9 +1173,6 @@ samerr_t sam_winsock_cleanup()
*/ */
samerr_t sam_winsock_startup() samerr_t sam_winsock_startup()
{ {
/*
* Is Windows retarded or what?
*/
WORD wVersionRequested; WORD wVersionRequested;
WSADATA wsaData; WSADATA wsaData;
int rc; int rc;
@ -1292,7 +1289,7 @@ const char *sam_winsock_strerror(int code)
return "This is a nonrecoverable error"; return "This is a nonrecoverable error";
case WSANO_DATA: case WSANO_DATA:
return "Valid name, no data record of requested type"; return "Valid name, no data record of requested type";
/* None of this shit compiles under Mingw - who knows why... /* None of this compiles under Mingw - who knows why...
case WSA_INVALID_HANDLE: case WSA_INVALID_HANDLE:
return "Specified event object handle is invalid"; return "Specified event object handle is invalid";
case WSA_INVALID_PARAMETER: case WSA_INVALID_PARAMETER:

View File

@ -758,7 +758,7 @@ sub recv {
# this means we can load more. Dangerous loop but well... # this means we can load more. Dangerous loop but well...
while(length($self->{inbuffer}) < $self->{bytestoread}) { while(length($self->{inbuffer}) < $self->{bytestoread}) {
# this should definately end some day # this should definitely end some day
$counter++; $counter++;
if($counter > 10000) { if($counter > 10000) {
$self->log("Error: SAM::recv(): WTF, could not fill inbuffer as predicted by SAM header"); $self->log("Error: SAM::recv(): WTF, could not fill inbuffer as predicted by SAM header");

View File

@ -25,7 +25,7 @@ then
fi fi
# on windows, one must specify the path of commnad find # on windows, one must specify the path of commnad find
# since windows has its own retarded version of find. # since windows has its own version of find.
if which find|grep -q -i windows ; then if which find|grep -q -i windows ; then
export PATH=.:/bin:/usr/local/bin:$PATH export PATH=.:/bin:/usr/local/bin:$PATH
fi fi

View File

@ -25,7 +25,7 @@ then
fi fi
# on windows, one must specify the path of commnad find # on windows, one must specify the path of commnad find
# since windows has its own retarded version of find. # since windows has its own version of find.
if which find|grep -q -i windows ; then if which find|grep -q -i windows ; then
export PATH=.:/bin:/usr/local/bin:$PATH export PATH=.:/bin:/usr/local/bin:$PATH
fi fi

View File

@ -60,7 +60,7 @@ import net.i2p.util.VersionComparator;
* only one thread should send messages at any given time * only one thread should send messages at any given time
* *
* Public only for clearCache(). * Public only for clearCache().
* Except for methods definied in I2PSession and I2CPMessageEventListener, * Except for methods defined in I2PSession and I2CPMessageEventListener,
* not maintained as a public API, not for external use. * not maintained as a public API, not for external use.
* Use I2PClientFactory to get an I2PClient and then createSession(). * Use I2PClientFactory to get an I2PClient and then createSession().
* *

View File

@ -1,3 +1,9 @@
2015-02-12 dg
* Job Queue/stats: add stat/graph for amount of scheduled jobs (router.tunnelBacklog)
* FloodfillMonitorJob:
- Use avg of router.tunnelBacklog instead of current backlog
* Some language/spelling fixes
2015-05-11 zzz 2015-05-11 zzz
* Util: Fix corruption of cached ReusableGZIPInputStreams * Util: Fix corruption of cached ReusableGZIPInputStreams

View File

@ -19,7 +19,7 @@ then
fi fi
# on windows, one must specify the path of commnad find # on windows, one must specify the path of commnad find
# since windows has its own retarded version of find. # since windows has its own version of find.
if which find|grep -q -i windows ; then if which find|grep -q -i windows ; then
export PATH=.:/bin:/usr/local/bin:$PATH export PATH=.:/bin:/usr/local/bin:$PATH
fi fi

View File

@ -31,7 +31,7 @@ public class TunnelDataMessage extends FastI2NPMessageImpl {
public final static int MESSAGE_TYPE = 18; public final static int MESSAGE_TYPE = 18;
public static final int DATA_SIZE = 1024; public static final int DATA_SIZE = 1024;
/** if we can't deliver a tunnel message in 10s, fuck it */ /** if we can't deliver a tunnel message in 10s, forget it */
private static final int EXPIRATION_PERIOD = 10*1000; private static final int EXPIRATION_PERIOD = 10*1000;
private static final ByteCache _cache; private static final ByteCache _cache;

View File

@ -25,7 +25,7 @@ public class TunnelGatewayMessage extends FastI2NPMessageImpl {
//private Exception _creator; //private Exception _creator;
public final static int MESSAGE_TYPE = 19; public final static int MESSAGE_TYPE = 19;
/** if we can't deliver a tunnel message in 10s, fuck it */ /** if we can't deliver a tunnel message in 10s, forget it */
private static final int EXPIRATION_PERIOD = 10*1000; private static final int EXPIRATION_PERIOD = 10*1000;
public TunnelGatewayMessage(I2PAppContext context) { public TunnelGatewayMessage(I2PAppContext context) {

View File

@ -642,7 +642,6 @@ public class Router implements RouterClock.ClockShiftListener {
File f = new File(filename); File f = new File(filename);
if (f.canRead()) { if (f.canRead()) {
DataHelper.loadProps(props, f); DataHelper.loadProps(props, f);
// dont be a wanker
props.remove(PROP_SHUTDOWN_IN_PROGRESS); props.remove(PROP_SHUTDOWN_IN_PROGRESS);
} else { } else {
if (log != null) if (log != null)

View File

@ -160,7 +160,9 @@ class FloodfillMonitorJob extends JobImpl {
// For reference, the avg lifetime job lag on my Pi is 6. // For reference, the avg lifetime job lag on my Pi is 6.
// Should we consider avg. dropped ff jobs? // Should we consider avg. dropped ff jobs?
RateStat lagStat = getContext().statManager().getRate("jobQueue.jobLag"); RateStat lagStat = getContext().statManager().getRate("jobQueue.jobLag");
RateStat queueStat = getContext().statManager().getRate("router.tunnelBacklog");
happy = happy && lagStat.getRate(60*60*1000L).getAvgOrLifetimeAvg() < 25; happy = happy && lagStat.getRate(60*60*1000L).getAvgOrLifetimeAvg() < 25;
happy = happy && getContext().tunnelManager().queueStat.getRate(60*60*1000L).getAvgOrLifetimeAvg() < 5;
happy = happy && getContext().tunnelManager().getInboundBuildQueueSize() < 5; happy = happy && getContext().tunnelManager().getInboundBuildQueueSize() < 5;
// Only if we're pretty well integrated... // Only if we're pretty well integrated...
happy = happy && _facade.getKnownRouters() >= 400; happy = happy && _facade.getKnownRouters() >= 400;

View File

@ -39,6 +39,7 @@ public class CoalesceStatsEvent implements SimpleTimer.TimedEvent {
ctx.statManager().createRateStat("router.activeSendPeers", "How many peers we've sent to this minute", "Throttle", new long[] { 60*1000, 5*60*1000, 60*60*1000 }); ctx.statManager().createRateStat("router.activeSendPeers", "How many peers we've sent to this minute", "Throttle", new long[] { 60*1000, 5*60*1000, 60*60*1000 });
ctx.statManager().createRequiredRateStat("router.fastPeers", _x("Known fast peers"), "Throttle", new long[] { 5*60*1000, 60*60*1000 }); ctx.statManager().createRequiredRateStat("router.fastPeers", _x("Known fast peers"), "Throttle", new long[] { 5*60*1000, 60*60*1000 });
ctx.statManager().createRateStat("router.integratedPeers", _x("Known integrated (floodfill) peers"), "Throttle", new long[] { 60*1000, 5*60*1000, 60*60*1000 }); ctx.statManager().createRateStat("router.integratedPeers", _x("Known integrated (floodfill) peers"), "Throttle", new long[] { 60*1000, 5*60*1000, 60*60*1000 });
ctx.statManager().createRateStat("router.tunnelBacklog", _x("Size of tunnel acceptor backlog"), "Tunnels", new long[] { 60*1000, 5*60*1000, 60*60*1000 });
_maxMemory = Runtime.getRuntime().maxMemory(); _maxMemory = Runtime.getRuntime().maxMemory();
String legend = "(Bytes)"; String legend = "(Bytes)";
if (_maxMemory < Long.MAX_VALUE) if (_maxMemory < Long.MAX_VALUE)
@ -68,6 +69,7 @@ public class CoalesceStatsEvent implements SimpleTimer.TimedEvent {
getContext().statManager().addRateData("bw.sendRate", (long)getContext().bandwidthLimiter().getSendBps()); getContext().statManager().addRateData("bw.sendRate", (long)getContext().bandwidthLimiter().getSendBps());
getContext().statManager().addRateData("bw.recvRate", (long)getContext().bandwidthLimiter().getReceiveBps()); getContext().statManager().addRateData("bw.recvRate", (long)getContext().bandwidthLimiter().getReceiveBps());
getContext().statManager().addRateData("router.tunnelBacklog", getContext().tunnelManager().getInboundBuildQueueSize(), 60*1000);
long used = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory(); long used = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();
getContext().statManager().addRateData("router.memoryUsed", used); getContext().statManager().addRateData("router.memoryUsed", used);
if (_maxMemory - used < LOW_MEMORY_THRESHOLD) if (_maxMemory - used < LOW_MEMORY_THRESHOLD)

View File

@ -11,7 +11,7 @@ import net.i2p.util.Log;
/** /**
* Priority Blocking Queue using methods in the entries, * Priority Blocking Queue using methods in the entries,
* as definied in PQEntry, to store priority and sequence number, * as defined in PQEntry, to store priority and sequence number,
* ensuring FIFO order within a priority. * ensuring FIFO order within a priority.
* *
* Input: add(), offer(), and put() are overridden to add a sequence number. * Input: add(), offer(), and put() are overridden to add a sequence number.

View File

@ -131,7 +131,7 @@ public class BatchedFragmentTest extends FragmentTest {
*/ */
public void runBatches() { public void runBatches() {
//success += testBatched(1, false, false, 1024, false, false); //success += testBatched(1, false, false, 1024, false, false);
// this takes a long fucking time // this takes a long long time
for (int i = 1; i <= 1024; i++) { for (int i = 1; i <= 1024; i++) {
testBatched(i, false, false, 1024, false, false, 1024, false, false); testBatched(i, false, false, 1024, false, false, 1024, false, false);
testBatched(i, true, false, 1024, false, false, 1024, false, false); testBatched(i, true, false, 1024, false, false, 1024, false, false);