Package com.aelitis.azureus.core.dht.db

Examples of com.aelitis.azureus.core.dht.db.DHTDBStats


        DHT  dht = dhts[i];
       
        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]+
                 ",div_f=" + dbv_details[DHTDBStats.VD_DIV_FREQ]+
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]+
             ",div_f=" + dbv_details[DHTDBStats.VD_DIV_FREQ]+
View Full Code Here

 
  private int refreshIter = 0;
 
  private void refreshDB() {   
    if(refreshIter == 0) {
    DHTDBStats    dbStats = dht.getDataBase().getStats();
      lblKeys.setText("" + dbStats.getKeyCount() + " (" + dbStats.getLocalKeyCount() + ")" )
      int[] stats = dbStats.getValueDetails();
      lblValues.setText("" + stats[DHTDBStats.VD_VALUE_COUNT]);
      lblSize.setText(DisplayFormatters.formatByteCountToKiBEtc(dbStats.getSize()));
      lblDirect.setText(DisplayFormatters.formatByteCountToKiBEtc( stats[DHTDBStats.VD_DIRECT_SIZE]));
      lblIndirect.setText(DisplayFormatters.formatByteCountToKiBEtc( stats[DHTDBStats.VD_INDIRECT_SIZE]));
      lblLocal.setText(DisplayFormatters.formatByteCountToKiBEtc( stats[DHTDBStats.VD_LOCAL_SIZE]));
     
      DHTStorageAdapter sa = dht.getStorageAdapter();
View Full Code Here

TOP

Related Classes of com.aelitis.azureus.core.dht.db.DHTDBStats

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.