unused code out
This commit is contained in:
@ -135,12 +135,14 @@ public class SummaryHelper extends HelperBase {
|
|||||||
* Retrieve amount of used memory.
|
* Retrieve amount of used memory.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
/********
|
||||||
public String getMemory() {
|
public String getMemory() {
|
||||||
DecimalFormat integerFormatter = new DecimalFormat("###,###,##0");
|
DecimalFormat integerFormatter = new DecimalFormat("###,###,##0");
|
||||||
long used = (Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory())/1024;
|
long used = (Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory())/1024;
|
||||||
long usedPc = 100 - ((Runtime.getRuntime().freeMemory() * 100) / Runtime.getRuntime().totalMemory());
|
long usedPc = 100 - ((Runtime.getRuntime().freeMemory() * 100) / Runtime.getRuntime().totalMemory());
|
||||||
return integerFormatter.format(used) + "KB (" + usedPc + "%)";
|
return integerFormatter.format(used) + "KB (" + usedPc + "%)";
|
||||||
}
|
}
|
||||||
|
********/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* How many peers we are talking to now
|
* 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.
|
* How many peers the router ranks as failing.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
/********
|
||||||
public int getFailingPeers() {
|
public int getFailingPeers() {
|
||||||
if (_context == null)
|
if (_context == null)
|
||||||
return 0;
|
return 0;
|
||||||
else
|
else
|
||||||
return _context.profileOrganizer().countFailingPeers();
|
return _context.profileOrganizer().countFailingPeers();
|
||||||
}
|
}
|
||||||
|
********/
|
||||||
/**
|
/**
|
||||||
* How many peers totally suck.
|
* How many peers totally suck.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
/********
|
||||||
public int getShitlistedPeers() {
|
public int getShitlistedPeers() {
|
||||||
if (_context == null)
|
if (_context == null)
|
||||||
return 0;
|
return 0;
|
||||||
else
|
else
|
||||||
return _context.shitlist().getRouterCount();
|
return _context.shitlist().getRouterCount();
|
||||||
}
|
}
|
||||||
|
********/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* How fast we have been receiving data over the last second (pretty printed
|
* 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());
|
return String.valueOf(_context.tunnelManager().getInboundBuildQueueSize());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*******
|
||||||
public String getPRNGStatus() {
|
public String getPRNGStatus() {
|
||||||
Rate r = _context.statManager().getRate("prng.bufferWaitTime").getRate(60*1000);
|
Rate r = _context.statManager().getRate("prng.bufferWaitTime").getRate(60*1000);
|
||||||
int use = (int) r.getLastEventCount();
|
int use = (int) r.getLastEventCount();
|
||||||
@ -531,6 +538,7 @@ public class SummaryHelper extends HelperBase {
|
|||||||
rv = rv + ' ' + (60*1000 / (use * i)) + 'x';
|
rv = rv + ' ' + (60*1000 / (use * i)) + 'x';
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
********/
|
||||||
|
|
||||||
public boolean updateAvailable() {
|
public boolean updateAvailable() {
|
||||||
return NewsFetcher.getInstance(_context).updateAvailable();
|
return NewsFetcher.getInstance(_context).updateAvailable();
|
||||||
|
@ -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); }
|
//try { _sessionKeyPersistenceHelper.shutdown(); } catch (Throwable t) { _log.log(Log.CRIT, "Error shutting down the session key manager", t); }
|
||||||
_context.deleteTempDir();
|
_context.deleteTempDir();
|
||||||
RouterContext.listContexts().remove(_context);
|
RouterContext.listContexts().remove(_context);
|
||||||
//dumpStats();
|
|
||||||
finalShutdown(exitCode);
|
finalShutdown(exitCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1067,10 +1066,6 @@ public class Router {
|
|||||||
_log.log(Log.CRIT, "Restart complete");
|
_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[]) {
|
public static void main(String args[]) {
|
||||||
System.out.println("Starting I2P " + RouterVersion.FULL_VERSION);
|
System.out.println("Starting I2P " + RouterVersion.FULL_VERSION);
|
||||||
// installUpdates() moved to constructor so we can get file locations from the context
|
// installUpdates() moved to constructor so we can get file locations from the context
|
||||||
|
Reference in New Issue
Block a user