2007-07-15 zzz
* Add current values to graph legends * Fix up previous Rate fix to check for divide by zero
This commit is contained in:
@ -151,7 +151,7 @@ public class StatSummarizer implements Runnable {
|
||||
//long begin = System.currentTimeMillis();
|
||||
try {
|
||||
RrdGraphDef def = new RrdGraphDef();
|
||||
def.setTimePeriod(start/1000, end/1000);
|
||||
def.setTimePeriod(start/1000, 0);
|
||||
def.setBaseValue(1024);
|
||||
String title = "Bandwidth usage";
|
||||
if (!hideTitle)
|
||||
|
@ -182,12 +182,16 @@ class SummaryRenderer {
|
||||
//long begin = System.currentTimeMillis();
|
||||
try {
|
||||
RrdGraphDef def = new RrdGraphDef();
|
||||
def.setTimePeriod(start/1000, end/1000);
|
||||
def.setTimePeriod(start/1000, 0);
|
||||
String name = _listener.getRate().getRateStat().getName();
|
||||
if ((name.startsWith("bw.") || name.endsWith("PacketSize")) && !showEvents)
|
||||
def.setBaseValue(1024);
|
||||
String title = name + " averaged for "
|
||||
+ DataHelper.formatDuration(_listener.getRate().getPeriod());
|
||||
String title = name;
|
||||
if (showEvents)
|
||||
title = title + " events in ";
|
||||
else
|
||||
title = title + " averaged for ";
|
||||
title = title + DataHelper.formatDuration(_listener.getRate().getPeriod());
|
||||
if (!hideTitle)
|
||||
def.setTitle(title);
|
||||
String path = _listener.getData().getPath();
|
||||
@ -206,8 +210,9 @@ class SummaryRenderer {
|
||||
def.datasource(plotName, path, plotName, "AVERAGE", "MEMORY");
|
||||
def.area(plotName, Color.BLUE, descr + "@r");
|
||||
if (!hideLegend) {
|
||||
def.gprint(plotName, "AVERAGE", "average: @2@s");
|
||||
def.gprint(plotName, "MAX", " max: @2@s@r");
|
||||
def.gprint(plotName, "AVERAGE", "avg: @2@s");
|
||||
def.gprint(plotName, "MAX", " max: @2@s");
|
||||
def.gprint(plotName, "LAST", " now: @2@s@r");
|
||||
}
|
||||
if (!showCredit)
|
||||
def.setShowSignature(false);
|
||||
|
@ -202,8 +202,11 @@ public class Rate {
|
||||
_lastEventCount = (long) (0.499999 + (_currentEventCount / periodFactor));
|
||||
_lastTotalEventTime = (long) (_currentTotalEventTime / periodFactor);
|
||||
_lastCoalesceDate = now;
|
||||
correctedTotalValue = _currentTotalValue *
|
||||
(_lastEventCount / (double) _currentEventCount);
|
||||
if (_currentEventCount == 0)
|
||||
correctedTotalValue = 0;
|
||||
else
|
||||
correctedTotalValue = _currentTotalValue *
|
||||
(_lastEventCount / (double) _currentEventCount);
|
||||
|
||||
if (_lastTotalValue > _extremeTotalValue) {
|
||||
_extremeTotalValue = _lastTotalValue;
|
||||
|
@ -1,4 +1,8 @@
|
||||
$Id: history.txt,v 1.575 2007-07-14 13:44:11 zzz Exp $
|
||||
$Id: history.txt,v 1.576 2007-07-14 19:56:18 complication Exp $
|
||||
|
||||
2007-07-15 zzz
|
||||
* Add current values to graph legends
|
||||
* Fix up previous Rate fix to check for divide by zero
|
||||
|
||||
2007-07-14 Complication
|
||||
* Take the post-download routerInfo size check back out of ReseedHandler,
|
||||
|
@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
|
||||
*
|
||||
*/
|
||||
public class RouterVersion {
|
||||
public final static String ID = "$Revision: 1.510 $ $Date: 2007-07-14 13:44:12 $";
|
||||
public final static String ID = "$Revision: 1.511 $ $Date: 2007-07-14 19:56:20 $";
|
||||
public final static String VERSION = "0.6.1.28";
|
||||
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 + "-" + BUILD);
|
||||
System.out.println("Router ID: " + RouterVersion.ID);
|
||||
|
Reference in New Issue
Block a user