Beispiel #1
0
 private void createRates(String statGroup) {
   if (_failedLookupRate == null)
     _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());
 }