Update of /cvsroot/freenet/freenet/src/freenet/diagnostics
In directory sc8-pr-cvs1:/tmp/cvs-serv14016/src/freenet/diagnostics
Modified Files:
AutoPoll.java FileEventList.java StandardDiagnostics.java
DiagnosticsTest.java
Log Message:
6290: don't show the request box either when in simple mode.
Index: AutoPoll.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/diagnostics/AutoPoll.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -w -r1.5 -r1.6
--- AutoPoll.java 15 Jul 2003 14:15:09 -0000 1.5
+++ AutoPoll.java 31 Oct 2003 19:21:18 -0000 1.6
@@ -178,7 +178,7 @@
p.getValue() instanceof Integer)) {
logger.log(this, "Binomial expects returned pair to contain"
+ " Integers, but got " + p.getKey().getClass()
- + " and " + p.getValue().getClass(), logger.NORMAL);
+ + " and " + p.getValue().getClass(), Logger.NORMAL);
return;
}
Index: FileEventList.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/diagnostics/FileEventList.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -w -r1.4 -r1.5
--- FileEventList.java 11 Oct 2003 20:00:17 -0000 1.4
+++ FileEventList.java 31 Oct 2003 19:21:18 -0000 1.5
@@ -108,7 +108,7 @@
} catch (IOException e) {
Core.logger.log(this,
"Failed to write data to disk, not overwriting",
- e, Core.logger.ERROR);
+ e, Logger.ERROR);
return false;
} finally {
if(out != null) {
@@ -136,7 +136,7 @@
} catch (IOException e) {
Core.logger.log(this,
"Failed to read data from disk, using empty file.",
- e, Core.logger.ERROR);
+ e, Logger.ERROR);
return new DoublyLinkedListImpl();
} finally {
if(in != null) {
Index: StandardDiagnostics.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/diagnostics/StandardDiagnostics.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -w -r1.9 -r1.10
--- StandardDiagnostics.java 30 Oct 2003 01:34:07 -0000 1.9
+++ StandardDiagnostics.java 31 Oct 2003 19:21:18 -0000 1.10
@@ -86,7 +86,7 @@
logger.log(this, "Sorry, my time traveling friend, "
+ "diagnostics cannot function before Jan 1st 2000. "
+ "Don't worry though, Freenet works fine without "
- + "diagnostics.", logger.NORMAL);
+ + "diagnostics.", Logger.NORMAL);
throw new DiagnosticsException("Diagnostics requires date > "
+ (new Date(y2k)).toString());
}
@@ -204,7 +204,7 @@
+ (new Date(time)).toString()
+ "! I can probably handle this, but if you get "
+ "trouble consider turning off Diagnostics.",
- logger.NORMAL);
+ Logger.NORMAL);
}
long[] tperiods;
// iterate over minutes since minute following last run
@@ -282,7 +282,7 @@
} catch (IOException e) {
logger.log(this,
"Failed to create stat file, reverting to memory",
- e, logger.NORMAL);
+ e, Logger.NORMAL);
return new LinkedEventList();
}
}
@@ -305,17 +305,17 @@
if (FileEventList.isCached(statsDir, name, type)) {
logger.log(this, "Found file for var " + name +
" type: " + type,
- logger.DEBUG);
+ Logger.DEBUG);
return new FileEventList(statsDir, name, type);
} else {
logger.log(this, "Did NOT find file for var " + name +
" type: " + type,
- logger.DEBUG);
+ Logger.DEBUG);
return null;
}
} catch (IOException e) {
logger.log(this, "Failed to read cached stats - data lost?",
- e, logger.NORMAL);
+ e, Logger.NORMAL);
return null;
}
}
Index: DiagnosticsTest.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/diagnostics/DiagnosticsTest.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -w -r1.7 -r1.8
--- DiagnosticsTest.java 30 Oct 2003 01:34:07 -0000 1.7
+++ DiagnosticsTest.java 31 Oct 2003 19:21:18 -0000 1.8
@@ -33,19 +33,19 @@
}
public void testGeneral() {
- assertEquals("Testing minute length",diag.getPeriod(diag.MINUTE),
+ assertEquals("Testing minute
length",Diagnostics.getPeriod(Diagnostics.MINUTE),
60 * 1000);
- assertEquals("Testing hour length",diag.getPeriod(diag.HOUR),
+ assertEquals("Testing hour length",Diagnostics.getPeriod(Diagnostics.HOUR),
60 * 60 * 1000);
- assertEquals("Testing day length",diag.getPeriod(diag.DAY),
+ assertEquals("Testing day length",Diagnostics.getPeriod(Diagnostics.DAY),
24 * 60 * 60 * 1000);
// I can't do much testing here. It runs on the system clock, so
// there is no way to do a fastforward. I'll just do some things
// to make sure they don't through errors.
- diag.registerBinomial("testBin",diag.MINUTE, "Test", null);
- diag.registerContinuous("testCont",diag.HOUR, "Test", null);
- diag.registerCounting("testCount",diag.HOUR, "Test", null);
+ diag.registerBinomial("testBin",Diagnostics.MINUTE, "Test", null);
+ diag.registerContinuous("testCont",Diagnostics.HOUR, "Test", null);
+ diag.registerCounting("testCount",Diagnostics.HOUR, "Test", null);
diag.occurrenceBinomial("testBin",10, 1);
try {
_______________________________________________
cvs mailing list
[EMAIL PROTECTED]
http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/cvs