Package com.aelitis.azureus.core.dht.transport

Examples of com.aelitis.azureus.core.dht.transport.DHTTransportStats


  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() +
View Full Code Here


 
  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();
   
    String  puncher_str;
   
    if ( puncher == null ){
      puncher_str = "";
    }else{
      puncher_str = puncher.operational()?yes_str:no_str;
    }
   
    lblRendezvous.setText(transport.isReachable()?"":puncher_str);
    long[] stats = routerStats.getStats();
    lblNodes.setText("" + stats[DHTRouterStats.ST_NODES]);
    lblLeaves.setText("" + stats[DHTRouterStats.ST_LEAVES]);
    lblContacts.setText("" + stats[DHTRouterStats.ST_CONTACTS]);
    lblReplacements.setText("" + stats[DHTRouterStats.ST_REPLACEMENTS]);
    lblLive.setText("" + stats[DHTRouterStats.ST_CONTACTS_LIVE]);
    lblUnknown.setText("" + stats[DHTRouterStats.ST_CONTACTS_UNKNOWN]);
    lblDying.setText("" + stats[DHTRouterStats.ST_CONTACTS_DEAD]);
   
    long skew_average = transportStats.getSkewAverage();
   
    lblSkew.setText( skew_average==0?"":(skew_average<0?"-":"") + TimeFormatter.format100ths( Math.abs(skew_average )));
  }
View Full Code Here

    }

  }

  private void refreshTransportDetails() {
    DHTTransportStats   transportStats = dht.getTransport().getStats();
    lblReceivedBytes.setText(DisplayFormatters.formatByteCountToKiBEtc(transportStats.getBytesReceived()));
    lblSentBytes.setText(DisplayFormatters.formatByteCountToKiBEtc(transportStats.getBytesSent()));
    lblReceivedPackets.setText("" + transportStats.getPacketsReceived());
    lblSentPackets.setText("" + transportStats.getPacketsSent());
  }
View Full Code Here

    lblReceivedPackets.setText("" + transportStats.getPacketsReceived());
    lblSentPackets.setText("" + transportStats.getPacketsSent());
  }
 
  private void refreshOperationDetails() {  
    DHTTransportStats   transportStats = dht.getTransport().getStats();
    long[] pings = transportStats.getPings();
    for(int i = 0 ; i < 4 ; i++) {
      lblPings[i].setText("" + pings[i]);
    }
   
    long[] findNodes = transportStats.getFindNodes();
    for(int i = 0 ; i < 4 ; i++) {
      lblFindNodes[i].setText("" + findNodes[i]);
    }
   
    long[] findValues = transportStats.getFindValues();
    for(int i = 0 ; i < 4 ; i++) {
      lblFindValues[i].setText("" + findValues[i]);
    }
   
    long[] stores   = transportStats.getStores();
    long[] qstores   = transportStats.getQueryStores();
   
    for(int i = 0 ; i < 4 ; i++) {
      lblStores[i].setText("" + stores[i] + " (" + qstores[i] + ")");
    }
    long[] data = transportStats.getData();
    for(int i = 0 ; i < 4 ; i++) {
      lblData[i].setText("" + data[i]);
    }
  }
View Full Code Here

TOP

Related Classes of com.aelitis.azureus.core.dht.transport.DHTTransportStats

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.