Package com.aelitis.azureus.core.dht.control

Examples of com.aelitis.azureus.core.dht.control.DHTControlStats


       
        DHTTransport transport = dht.getTransport();
       
        DHTTransportStats  t_stats = transport.getStats();
        DHTDBStats      d_stats  = dht.getDataBase().getStats();
        DHTControlStats    c_stats = dht.getControl().getStats();
        DHTRouterStats    r_stats = dht.getRouter().getStats();
       
        long[]  rs = r_stats.getStats();
 
        DHTNetworkPosition[]  nps = transport.getLocalContact().getNetworkPositions();
       
        String  np_str = "";
       
        for (int j=0;j<nps.length;j++){
          np_str += (j==0?"":",") + nps[j];
        }
       
        ci.out.println(   "DHT:ip=" + transport.getLocalContact().getAddress() +
                  ",net=" + transport.getNetwork() +
                  ",prot=V" + transport.getProtocolVersion() +
                  ",np=" + np_str);
       
        ci.out.println(  
              "Router" +
              ":nodes=" + rs[DHTRouterStats.ST_NODES] +
              ",leaves=" + rs[DHTRouterStats.ST_LEAVES] +
              ",contacts=" + rs[DHTRouterStats.ST_CONTACTS] +
              ",replacement=" + rs[DHTRouterStats.ST_REPLACEMENTS] +
              ",live=" + rs[DHTRouterStats.ST_CONTACTS_LIVE] +
              ",unknown=" + rs[DHTRouterStats.ST_CONTACTS_UNKNOWN] +
              ",failing=" + rs[DHTRouterStats.ST_CONTACTS_DEAD]);
 
        ci.out.println(
              "Transport" +
              ":" + t_stats.getString());
           
        int[]  dbv_details = d_stats.getValueDetails();
       
        ci.out.println(
              "Control:dht=" + c_stats.getEstimatedDHTSize() +
                 ", Database:keys=" + d_stats.getKeyCount() +
                 ",vals=" + dbv_details[DHTDBStats.VD_VALUE_COUNT]+
                 ",loc=" + dbv_details[DHTDBStats.VD_LOCAL_SIZE]+
                 ",dir=" + dbv_details[DHTDBStats.VD_DIRECT_SIZE]+
                 ",ind=" + dbv_details[DHTDBStats.VD_INDIRECT_SIZE]+
View Full Code Here


 
  public void
  logStats()
  {
    DHTDBStats      d_stats  = dht.getDataBase().getStats();
    DHTControlStats    c_stats = dht.getControl().getStats();
    DHTRouterStats    r_stats = dht.getRouter().getStats();
    DHTTransportStats   t_stats = transport.getStats();

    long[]  rs = r_stats.getStats();

    log.log( "DHT:ip=" + transport.getLocalContact().getAddress() +
          ",net=" + transport.getNetwork() +
          ",prot=V" + transport.getProtocolVersion()+
          ",reach=" + transport.isReachable());

    log.log(   "Router" +
          ":nodes=" + rs[DHTRouterStats.ST_NODES] +
          ",leaves=" + rs[DHTRouterStats.ST_LEAVES] +
          ",contacts=" + rs[DHTRouterStats.ST_CONTACTS] +
          ",replacement=" + rs[DHTRouterStats.ST_REPLACEMENTS] +
          ",live=" + rs[DHTRouterStats.ST_CONTACTS_LIVE] +
          ",unknown=" + rs[DHTRouterStats.ST_CONTACTS_UNKNOWN] +
          ",failing=" + rs[DHTRouterStats.ST_CONTACTS_DEAD]);

    log.log(   "Transport" +
          ":" + t_stats.getString());
       
    int[]  dbv_details = d_stats.getValueDetails();
   
    log.log(    "Control:dht=" + c_stats.getEstimatedDHTSize() +
             ", Database:keys=" + d_stats.getKeyCount() +
             ",vals=" + dbv_details[DHTDBStats.VD_VALUE_COUNT]+
             ",loc=" + dbv_details[DHTDBStats.VD_LOCAL_SIZE]+
             ",dir=" + dbv_details[DHTDBStats.VD_DIRECT_SIZE]+
             ",ind=" + dbv_details[DHTDBStats.VD_INDIRECT_SIZE]+
View Full Code Here

    refreshOperationDetails();
    refreshActivity();
 
 
  private void refreshGeneral() {
    DHTControlStats controlStats = dht.getControl().getStats();
    DHTRouterStats routerStats = dht.getRouter().getStats();
    DHTTransport transport = dht.getTransport();
    DHTTransportStats transportStats = transport.getStats();
    lblUpTime.setText(TimeFormatter.format(controlStats.getRouterUptime() / 1000));
    lblNumberOfUsers.setText("" + controlStats.getEstimatedDHTSize());
    int percent = transportStats.getRouteablePercentage();
    lblReachable.setText((transport.isReachable()?yes_str:no_str) + (percent==-1?"":(" " + percent+"%")));
   
    DHTNATPuncher puncher = dht.getNATPuncher();
   
View Full Code Here

TOP

Related Classes of com.aelitis.azureus.core.dht.control.DHTControlStats

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.