unused code out

This commit is contained in:
zzz
2009-08-13 15:15:41 +00:00
parent 3fbff71861
commit 55e8583663
2 changed files with 8 additions and 5 deletions

View File

@ -135,12 +135,14 @@ public class SummaryHelper extends HelperBase {
* Retrieve amount of used memory.
*
*/
/********
public String getMemory() {
DecimalFormat integerFormatter = new DecimalFormat("###,###,##0");
long used = (Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory())/1024;
long usedPc = 100 - ((Runtime.getRuntime().freeMemory() * 100) / Runtime.getRuntime().totalMemory());
return integerFormatter.format(used) + "KB (" + usedPc + "%)";
}
********/
/**
* How many peers we are talking to now
@ -196,22 +198,26 @@ public class SummaryHelper extends HelperBase {
* How many peers the router ranks as failing.
*
*/
/********
public int getFailingPeers() {
if (_context == null)
return 0;
else
return _context.profileOrganizer().countFailingPeers();
}
********/
/**
* How many peers totally suck.
*
*/
/********
public int getShitlistedPeers() {
if (_context == null)
return 0;
else
return _context.shitlist().getRouterCount();
}
********/
/**
* How fast we have been receiving data over the last second (pretty printed
@ -510,6 +516,7 @@ public class SummaryHelper extends HelperBase {
return String.valueOf(_context.tunnelManager().getInboundBuildQueueSize());
}
/*******
public String getPRNGStatus() {
Rate r = _context.statManager().getRate("prng.bufferWaitTime").getRate(60*1000);
int use = (int) r.getLastEventCount();
@ -531,6 +538,7 @@ public class SummaryHelper extends HelperBase {
rv = rv + ' ' + (60*1000 / (use * i)) + 'x';
return rv;
}
********/
public boolean updateAvailable() {
return NewsFetcher.getInstance(_context).updateAvailable();

View File

@ -885,7 +885,6 @@ public class Router {
//try { _sessionKeyPersistenceHelper.shutdown(); } catch (Throwable t) { _log.log(Log.CRIT, "Error shutting down the session key manager", t); }
_context.deleteTempDir();
RouterContext.listContexts().remove(_context);
//dumpStats();
finalShutdown(exitCode);
}
@ -1067,10 +1066,6 @@ public class Router {
_log.log(Log.CRIT, "Restart complete");
}
private void dumpStats() {
//_log.log(Log.CRIT, "Lifetime stats:\n\n" + StatsGenerator.generateStatsPage());
}
public static void main(String args[]) {
System.out.println("Starting I2P " + RouterVersion.FULL_VERSION);
// installUpdates() moved to constructor so we can get file locations from the context