forked from I2P_Developers/i2p.i2p
Stats: 4 stats no longer required (thx drzed)
This commit is contained in:
@ -781,30 +781,6 @@ public class SummaryHelper extends HelperBase {
|
|||||||
return String.valueOf(_context.tunnelManager().getInboundBuildQueueSize());
|
return String.valueOf(_context.tunnelManager().getInboundBuildQueueSize());
|
||||||
}
|
}
|
||||||
|
|
||||||
/*******
|
|
||||||
public String getPRNGStatus() {
|
|
||||||
Rate r = _context.statManager().getRate("prng.bufferWaitTime").getRate(60*1000);
|
|
||||||
int use = (int) r.getLastEventCount();
|
|
||||||
int i = (int) (r.getAverageValue() + 0.5);
|
|
||||||
if (i <= 0) {
|
|
||||||
r = _context.statManager().getRate("prng.bufferWaitTime").getRate(10*60*1000);
|
|
||||||
i = (int) (r.getAverageValue() + 0.5);
|
|
||||||
}
|
|
||||||
String rv = i + "/";
|
|
||||||
r = _context.statManager().getRate("prng.bufferFillTime").getRate(60*1000);
|
|
||||||
i = (int) (r.getAverageValue() + 0.5);
|
|
||||||
if (i <= 0) {
|
|
||||||
r = _context.statManager().getRate("prng.bufferFillTime").getRate(10*60*1000);
|
|
||||||
i = (int) (r.getAverageValue() + 0.5);
|
|
||||||
}
|
|
||||||
rv = rv + i + "ms";
|
|
||||||
// margin == fill time / use time
|
|
||||||
if (use > 0 && i > 0)
|
|
||||||
rv = rv + ' ' + (60*1000 / (use * i)) + 'x';
|
|
||||||
return rv;
|
|
||||||
}
|
|
||||||
********/
|
|
||||||
|
|
||||||
private static boolean updateAvailable() {
|
private static boolean updateAvailable() {
|
||||||
return NewsHelper.isUpdateAvailable();
|
return NewsHelper.isUpdateAvailable();
|
||||||
}
|
}
|
||||||
|
@ -45,8 +45,8 @@ public class AsyncFortunaStandalone extends FortunaStandalone implements Runnabl
|
|||||||
_emptyBuffers = new LinkedBlockingQueue<AsyncBuffer>(_bufferCount);
|
_emptyBuffers = new LinkedBlockingQueue<AsyncBuffer>(_bufferCount);
|
||||||
_fullBuffers = new LinkedBlockingQueue<AsyncBuffer>(_bufferCount);
|
_fullBuffers = new LinkedBlockingQueue<AsyncBuffer>(_bufferCount);
|
||||||
_context = context;
|
_context = context;
|
||||||
context.statManager().createRequiredRateStat("prng.bufferWaitTime", "Delay for random number buffer (ms)", "Encryption", new long[] { 60*1000, 10*60*1000, 60*60*1000 } );
|
context.statManager().createRateStat("prng.bufferWaitTime", "Delay for random number buffer (ms)", "Encryption", new long[] { 60*1000, 10*60*1000, 60*60*1000 } );
|
||||||
context.statManager().createRequiredRateStat("prng.bufferFillTime", "Time to fill random number buffer (ms)", "Encryption", new long[] { 60*1000, 10*60*1000, 60*60*1000 } );
|
context.statManager().createRateStat("prng.bufferFillTime", "Time to fill random number buffer (ms)", "Encryption", new long[] { 60*1000, 10*60*1000, 60*60*1000 } );
|
||||||
_log = context.logManager().getLog(AsyncFortunaStandalone.class);
|
_log = context.logManager().getLog(AsyncFortunaStandalone.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -70,10 +70,10 @@ public final class ElGamalEngine {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public ElGamalEngine(I2PAppContext context) {
|
public ElGamalEngine(I2PAppContext context) {
|
||||||
context.statManager().createRequiredRateStat("crypto.elGamal.encrypt",
|
context.statManager().createRateStat("crypto.elGamal.encrypt",
|
||||||
"Time for ElGamal encryption (ms)", "Encryption",
|
"Time for ElGamal encryption (ms)", "Encryption",
|
||||||
new long[] { 60 * 60 * 1000});
|
new long[] { 60 * 60 * 1000});
|
||||||
context.statManager().createRequiredRateStat("crypto.elGamal.decrypt",
|
context.statManager().createRateStat("crypto.elGamal.decrypt",
|
||||||
"Time for ElGamal decryption (ms)", "Encryption",
|
"Time for ElGamal decryption (ms)", "Encryption",
|
||||||
new long[] { 60 * 60 * 1000});
|
new long[] { 60 * 60 * 1000});
|
||||||
_context = context;
|
_context = context;
|
||||||
|
Reference in New Issue
Block a user