Deprecate unused StatLog

This commit is contained in:
zzz
2019-06-24 14:33:56 +00:00
parent c1418a1c2e
commit d8e06a0d14
5 changed files with 8 additions and 10 deletions

View File

@ -18,6 +18,9 @@ import net.i2p.util.Log;
/**
* Note - if no filter is defined in stat.logFilters at startup, this class will not
* be instantiated - see StatManager.
*
* Deprecated - unused - to be removed.
* Not for external use - not a public API.
*/
public class BufferedStatLog implements StatLog {
private final I2PAppContext _context;

View File

@ -38,6 +38,11 @@ public class RateStat {
_rates[i] = rate;
}
}
/**
* Sets the default stat log for this RateStat.
* Deprecated, unused, to be disabled in a future release.
*/
public void setStatLog(StatLog sl) { _statLog = sl; }
/**

View File

@ -325,8 +325,6 @@ public class DBHistory {
_failedLookupRate = new RateStat("dbHistory.failedLookupRate", "How often does this peer to respond to a lookup?", statGroup, new long[] { 10*60*1000l, 60*60*1000l, 24*60*60*1000l });
if (_invalidReplyRate == null)
_invalidReplyRate = new RateStat("dbHistory.invalidReplyRate", "How often does this peer give us a bad (nonexistant, forged, etc) peer?", statGroup, new long[] { 30*60*1000l });
_failedLookupRate.setStatLog(_context.statManager().getStatLog());
_invalidReplyRate.setStatLog(_context.statManager().getStatLog());
}
private final static long getLong(Properties props, String key) {

View File

@ -482,10 +482,6 @@ public class PeerProfile {
if (_tunnelHistory == null)
_tunnelHistory = new TunnelHistory(_context, group);
//_sendSuccessSize.setStatLog(_context.statManager().getStatLog());
//_receiveSize.setStatLog(_context.statManager().getStatLog());
_tunnelCreateResponseTime.setStatLog(_context.statManager().getStatLog());
_tunnelTestResponseTime.setStatLog(_context.statManager().getStatLog());
_expanded = true;
}
@ -502,8 +498,6 @@ public class PeerProfile {
if (_dbHistory == null)
_dbHistory = new DBHistory(_context, group);
_dbResponseTime.setStatLog(_context.statManager().getStatLog());
_dbIntroduction.setStatLog(_context.statManager().getStatLog());
_expandedDB = true;
}

View File

@ -49,8 +49,6 @@ public class TunnelHistory {
private void createRates(String statGroup) {
_rejectRate = new RateStat("tunnelHistory.rejectRate", "How often does this peer reject a tunnel request?", statGroup, new long[] { 10*60*1000l, 30*60*1000l, 60*60*1000l, 24*60*60*1000l });
_failRate = new RateStat("tunnelHistory.failRate", "How often do tunnels this peer accepts fail?", statGroup, new long[] { 10*60*1000l, 30*60*1000l, 60*60*1000l, 24*60*60*1000l });
_rejectRate.setStatLog(_context.statManager().getStatLog());
_failRate.setStatLog(_context.statManager().getStatLog());
}
/** total tunnels the peer has agreed to participate in */