2004-12-19 jrandom
* Added three new stats - router.activePeers, router.fastPeers, and router.highCapacityPeers, updated every minute
This commit is contained in:
@ -1,4 +1,8 @@
|
||||
$Id: history.txt,v 1.112 2004/12/19 01:25:27 scintilla Exp $
|
||||
$Id: history.txt,v 1.113 2004/12/19 06:04:57 jrandom Exp $
|
||||
|
||||
2004-12-19 jrandom
|
||||
* Added three new stats - router.activePeers, router.fastPeers, and
|
||||
router.highCapacityPeers, updated every minute
|
||||
|
||||
2004-12-19 jrandom
|
||||
* Added a new i2ptunnel type: 'httpserver', allowing you to specify what
|
||||
|
@ -272,6 +272,9 @@ public class Router {
|
||||
super(Router.this._context);
|
||||
Router.this._context.statManager().createRateStat("bw.receiveBps", "How fast we receive data", "Bandwidth", new long[] { 60*1000, 5*60*1000, 60*60*1000 });
|
||||
Router.this._context.statManager().createRateStat("bw.sendBps", "How fast we send data", "Bandwidth", new long[] { 60*1000, 5*60*1000, 60*60*1000 });
|
||||
Router.this._context.statManager().createRateStat("router.activePeers", "How many peers we are actively talking with", "Throttle", new long[] { 5*60*1000, 60*60*1000 });
|
||||
Router.this._context.statManager().createRateStat("router.highCapacityPeers", "How many high capacity peers we know", "Throttle", new long[] { 5*60*1000, 60*60*1000 });
|
||||
Router.this._context.statManager().createRateStat("router.fastPeers", "How many fast peers we know", "Throttle", new long[] { 5*60*1000, 60*60*1000 });
|
||||
}
|
||||
public String getName() { return "Coalesce stats"; }
|
||||
public void runJob() {
|
||||
@ -297,6 +300,15 @@ public class Router {
|
||||
}
|
||||
}
|
||||
|
||||
int active = Router.this._context.commSystem().countActivePeers();
|
||||
Router.this._context.statManager().addRateData("router.activePeers", active, 60*1000);
|
||||
|
||||
int fast = Router.this._context.profileOrganizer().countFastPeers();
|
||||
Router.this._context.statManager().addRateData("router.fastPeers", fast, 60*1000);
|
||||
|
||||
int highCap = Router.this._context.profileOrganizer().countHighCapacityPeers();
|
||||
Router.this._context.statManager().addRateData("router.highCapacityPeers", highCap, 60*1000);
|
||||
|
||||
requeue(60*1000);
|
||||
}
|
||||
}
|
||||
|
@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
|
||||
*
|
||||
*/
|
||||
public class RouterVersion {
|
||||
public final static String ID = "$Revision: 1.117 $ $Date: 2004/12/19 01:25:27 $";
|
||||
public final static String ID = "$Revision: 1.118 $ $Date: 2004/12/19 06:04:57 $";
|
||||
public final static String VERSION = "0.4.2.4";
|
||||
public final static long BUILD = 2;
|
||||
public final static long BUILD = 3;
|
||||
public static void main(String args[]) {
|
||||
System.out.println("I2P Router version: " + VERSION);
|
||||
System.out.println("Router ID: " + RouterVersion.ID);
|
||||
|
Reference in New Issue
Block a user