2004-11-22 jrandom
* Update to the SAM bridge to reduce some unnecessary memory allocation. * New stat to keep track of slow jobs (ones that take more than a second to excute). This is published in the netDb as jobQueue.jobRunSlow
This commit is contained in:
@ -24,6 +24,7 @@ class JobQueueRunner implements Runnable {
|
||||
_lastJob = null;
|
||||
_log = _context.logManager().getLog(JobQueueRunner.class);
|
||||
_context.statManager().createRateStat("jobQueue.jobRun", "How long jobs take", "JobQueue", new long[] { 60*1000l, 60*60*1000l, 24*60*60*1000l });
|
||||
_context.statManager().createRateStat("jobQueue.jobRunSlow", "How long jobs that take over a second take", "JobQueue", new long[] { 10*60*1000l, 60*60*1000l, 24*60*60*1000l });
|
||||
_context.statManager().createRateStat("jobQueue.jobLag", "How long jobs have to wait before running", "JobQueue", new long[] { 60*1000l, 60*60*1000l, 24*60*60*1000l });
|
||||
_context.statManager().createRateStat("jobQueue.jobWait", "How long does a job sat on the job queue?", "JobQueue", new long[] { 60*1000l, 60*60*1000l, 24*60*60*1000l });
|
||||
_context.statManager().createRateStat("jobQueue.jobRunnerInactive", "How long are runners inactive?", "JobQueue", new long[] { 60*1000l, 60*60*1000l, 24*60*60*1000l });
|
||||
@ -96,13 +97,15 @@ class JobQueueRunner implements Runnable {
|
||||
_context.statManager().addRateData("jobQueue.jobLag", doStart - origStartAfter, 0);
|
||||
_context.statManager().addRateData("jobQueue.jobWait", enqueuedTime, enqueuedTime);
|
||||
|
||||
if (duration > 1000) {
|
||||
_context.statManager().addRateData("jobQueue.jobRunSlow", duration, duration);
|
||||
if (_log.shouldLog(Log.WARN))
|
||||
_log.warn("Duration of " + duration + " (lag "+ (doStart-origStartAfter)
|
||||
+ ") on job " + _currentJob);
|
||||
}
|
||||
|
||||
_state = 14;
|
||||
|
||||
|
||||
if ( (duration > 1000) && (_log.shouldLog(Log.WARN)) )
|
||||
_log.warn("Duration of " + duration + " (lag "+ (doStart-origStartAfter)
|
||||
+ ") on job " + _currentJob);
|
||||
|
||||
if (diff > 100) {
|
||||
if (_log.shouldLog(Log.WARN))
|
||||
_log.warn("Updating statistics for the job took too long [" + diff + "ms]");
|
||||
|
@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
|
||||
*
|
||||
*/
|
||||
public class RouterVersion {
|
||||
public final static String ID = "$Revision: 1.84 $ $Date: 2004/11/21 17:31:33 $";
|
||||
public final static String ID = "$Revision: 1.85 $ $Date: 2004/11/22 12:57:16 $";
|
||||
public final static String VERSION = "0.4.1.4";
|
||||
public final static long BUILD = 13;
|
||||
public final static long BUILD = 14;
|
||||
public static void main(String args[]) {
|
||||
System.out.println("I2P Router version: " + VERSION);
|
||||
System.out.println("Router ID: " + RouterVersion.ID);
|
||||
|
@ -106,6 +106,7 @@ public class StatisticsManager implements Service {
|
||||
//includeRate("tcp.queueSize", stats);
|
||||
//includeRate("jobQueue.jobLag", stats, new long[] { 60*1000, 60*60*1000 });
|
||||
//includeRate("jobQueue.jobRun", stats, new long[] { 60*1000, 60*60*1000 });
|
||||
includeRate("jobQueue.jobRunSlow", stats, new long[] { 10*60*1000l, 60*60*1000l });
|
||||
includeRate("crypto.elGamal.encrypt", stats, new long[] { 60*60*1000 });
|
||||
//includeRate("crypto.garlic.decryptFail", stats, new long[] { 60*60*1000, 24*60*60*1000 });
|
||||
includeRate("tunnel.unknownTunnelTimeLeft", stats, new long[] { 60*60*1000 });
|
||||
|
Reference in New Issue
Block a user