forked from I2P_Developers/i2p.i2p
* 2004-12-21 0.4.2.5 released
2004-12-21 jrandom * Track a new stat for expired client leases (client.leaseSetExpired).
This commit is contained in:
@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
|
||||
*
|
||||
*/
|
||||
public class RouterVersion {
|
||||
public final static String ID = "$Revision: 1.121 $ $Date: 2004/12/20 00:14:56 $";
|
||||
public final static String VERSION = "0.4.2.4";
|
||||
public final static long BUILD = 6;
|
||||
public final static String ID = "$Revision: 1.122 $ $Date: 2004/12/21 11:32:50 $";
|
||||
public final static String VERSION = "0.4.2.5";
|
||||
public final static long BUILD = 0;
|
||||
public static void main(String args[]) {
|
||||
System.out.println("I2P Router version: " + VERSION);
|
||||
System.out.println("Router ID: " + RouterVersion.ID);
|
||||
|
@ -51,6 +51,8 @@ class ClientLeaseSetManagerJob extends JobImpl {
|
||||
_pool = pool;
|
||||
_currentLeaseSet = null;
|
||||
_lastCreated = -1;
|
||||
context.statManager().createRateStat("client.leaseSetExpired", "How long ago did our leaseSet expire?", "ClientMessages", new long[] { 60*60*1000l, 24*60*60*1000l });
|
||||
|
||||
}
|
||||
|
||||
public void forceRequestLease() {
|
||||
@ -106,6 +108,13 @@ class ClientLeaseSetManagerJob extends JobImpl {
|
||||
_log.warn("Insufficient safe inbound tunnels exist for the client (" + available
|
||||
+ " available, " + _pool.getClientSettings().getNumInboundTunnels()
|
||||
+ " required) - no leaseSet requested");
|
||||
if (_currentLeaseSet != null) {
|
||||
long howOld = getContext().clock().now() - _currentLeaseSet.getEarliestLeaseDate();
|
||||
if (howOld > 0) {
|
||||
// expired
|
||||
getContext().statManager().addRateData("client.leaseSetExpired", howOld, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
requeue(RECHECK_DELAY);
|
||||
}
|
||||
|
Reference in New Issue
Block a user