Changeset d670d98


Ignore:
Timestamp:
Apr 26, 2009 4:15:48 AM (11 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
157b85b
Parents:
33b27620
Message:

stats cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/StatisticsManager.java

    r33b27620 rd670d98  
    5454    }
    5555   
    56     static final boolean CommentOutIn072 = RouterVersion.VERSION.equals("0.7.1");
    57 
    5856    /** Retrieve a snapshot of the statistics that should be published */
    5957    public Properties publishStatistics() {
     
    124122            //includeRate("jobQueue.jobRunSlow", stats, new long[] { 10*60*1000l, 60*60*1000l });
    125123            //includeRate("crypto.elGamal.encrypt", stats, new long[] { 60*60*1000 });
    126             includeRate("tunnel.participatingTunnels", stats, new long[] { 5*60*1000, 60*60*1000 });
     124            includeRate("tunnel.participatingTunnels", stats, new long[] { 60*60*1000 });
    127125            //includeRate("tunnel.testSuccessTime", stats, new long[] { 10*60*1000l });
    128126            //includeRate("client.sendAckTime", stats, new long[] { 60*60*1000 }, true);
     
    134132            //includeRate("stream.con.receiveDuplicateSize", stats, new long[] { 60*60*1000 });
    135133
    136             if (CommentOutIn072) {
    137                 // Round smaller uptimes to 1 hour, to frustrate uptime tracking
    138                 // Round 2nd hour to 90m since peers use 2h minimum to route
    139                 if (publishedUptime < 60*60*1000) publishedUptime = 60*60*1000;
    140                 else if (publishedUptime < 2*60*60*1000) publishedUptime = 90*60*1000;
    141                 stats.setProperty("stat_uptime", DataHelper.formatDuration(publishedUptime));
    142             } else {
    143                 // So that we will still get build requests
    144                 stats.setProperty("stat_uptime", "90m");
    145             }
    146134            //stats.setProperty("stat__rateKey", "avg;maxAvg;pctLifetime;[sat;satLim;maxSat;maxSatLim;][num;lifetimeFreq;maxFreq]");
    147135           
     
    151139           
    152140            //includeRate("tunnel.buildRequestTime", stats, new long[] { 10*60*1000 });
    153             long rate = CommentOutIn072 ? 10*60*1000 : 60*60*1000;
     141            long rate = 60*60*1000;
    154142            includeRate("tunnel.buildClientExpire", stats, new long[] { rate });
    155143            includeRate("tunnel.buildClientReject", stats, new long[] { rate });
     
    161149            //includeRate("tunnel.rejectOverloaded", stats, new long[] { 10*60*1000 });
    162150            //includeRate("tunnel.acceptLoad", stats, new long[] { 10*60*1000 });
    163            
    164             _log.debug("Publishing peer rankings");
    165         } else {
    166             // So that we will still get build requests
    167             stats.setProperty("stat_uptime", "90m");
    168             _log.debug("Not publishing peer rankings");
    169         }
     151        }
     152
     153        // So that we will still get build requests
     154        stats.setProperty("stat_uptime", "90m");
    170155        if (FloodfillNetworkDatabaseFacade.isFloodfill(_context.router().getRouterInfo())) {
    171156            stats.setProperty("netdb.knownRouters", ""+_context.netDb().getKnownRouters());
     
    173158        }
    174159
    175     if (_log.shouldLog(Log.DEBUG))
    176         _log.debug("Building status: " + stats);
    177160        return stats;
    178161    }
Note: See TracChangeset for help on using the changeset viewer.