Package com.aelitis.azureus.core.speedmanager

Examples of com.aelitis.azureus.core.speedmanager.SpeedManagerPingMapper


    }
   
    try{
      long  real_now = SystemTime.getCurrentTime();
     
      SpeedManagerPingMapper mapper = speed_manager.getActiveMapper();
     
      if ( rate_limit == 0 ){
       
        rate_limit = speed_manager.getEstimatedUploadCapacityBytesPerSec().getBytesPerSec();
       
        if ( rate_limit == 0 ){
         
          rate_limit = DEFAULT_UP_LIMIT;
        }
      }
     
      SpeedManagerLimitEstimate last_bad = mapper.getLastBadUploadLimit();
           
      if ( last_bad != null ){
       
        int last_bad_limit = last_bad.getBytesPerSec();
               
        if ( last_bad_limit != pm_last_bad_limit ){
         
          pm_last_bad_limit = last_bad_limit;
     
          SpeedManagerLimitEstimate[] bad_ups = mapper.getBadUploadHistory();
   
          int    total   = last_bad.getBytesPerSec();
          int    count  = 1;
         
          for ( SpeedManagerLimitEstimate bad: bad_ups ){
View Full Code Here


     */
    public static SpeedManagerLimitEstimate getUploadLimit(boolean persistent){
        try{
            SMInstance pm = SMInstance.getInstance();
            SpeedManagerAlgorithmProviderAdapter adapter = pm.getAdapter();
            SpeedManagerPingMapper persistentMap = adapter.getPingMapper();
            SpeedManagerLimitEstimate upEst = persistentMap.getEstimatedUploadLimit(true);

            return upEst;
           
        }catch(Throwable t){
            //log this event and
View Full Code Here

     */
    public static SpeedManagerLimitEstimate getDownloadLimit(){
        try{
            SMInstance pm = SMInstance.getInstance();
            SpeedManagerAlgorithmProviderAdapter adapter = pm.getAdapter();
            SpeedManagerPingMapper persistentMap = adapter.getPingMapper();
            SpeedManagerLimitEstimate downEst = persistentMap.getEstimatedDownloadLimit(true);

            return downEst;

        }catch(Throwable t){
            //log this event and
View Full Code Here

            }

            //NOTE: Currently just getting the persistentMap for temp logging purposes.
            SMInstance pm = SMInstance.getInstance();
            SpeedManagerAlgorithmProviderAdapter adapter = pm.getAdapter();
            SpeedManagerPingMapper persistentMap = adapter.getPingMapper();
            SpeedManagerLimitEstimate persistentEst = persistentMap.getEstimatedDownloadLimit(false);

            //log the different ping-mappers for beta.
            betaLogPingMapperEstimates("down",transientEst,wasChocked,persistentEst,pingMapOfDownloadMode,pingMapOfSeedingMode);

            if( transientEst!=null )
View Full Code Here

            }

            //NOTE: Currently just getting the persistentMap for temp logging purposes.
            SMInstance pm = SMInstance.getInstance();
            SpeedManagerAlgorithmProviderAdapter adapter = pm.getAdapter();
            SpeedManagerPingMapper persistentMap = adapter.getPingMapper();
            SpeedManagerLimitEstimate persistentEst = persistentMap.getEstimatedUploadLimit(false);

            //log the different ping-mappers for beta.
            betaLogPingMapperEstimates("up",transientEst,wasChocked,persistentEst,pingMapOfDownloadMode,pingMapOfSeedingMode);

            if( transientEst!=null )
View Full Code Here

        if( !useVariancePingMap){

            return pingMapOfDownloadMode.hadChockingPing(true);

        }else{
            SpeedManagerPingMapper pm = SMInstance.getInstance().getAdapter().getPingMapper();

            //if either had a choking ping.
            SpeedManagerLimitEstimate dEst = pm.getEstimatedDownloadLimit(true);
            SpeedManagerLimitEstimate uEst = pm.getEstimatedUploadLimit(true);

            boolean hadChokePingUp = (uEst.getEstimateType()==SpeedManagerLimitEstimate.TYPE_CHOKE_ESTIMATED);
            boolean hadChokePingDown = (dEst.getEstimateType()==SpeedManagerLimitEstimate.TYPE_CHOKE_ESTIMATED);

            return ( hadChokePingUp || hadChokePingDown );
View Full Code Here

            SpeedManagerLogger.log( sb.toString()  );
        }else{
            SMInstance pm = SMInstance.getInstance();
            SpeedManagerAlgorithmProviderAdapter adapter = pm.getAdapter();
            SpeedManagerPingMapper persistentMap = adapter.getPingMapper();

            SpeedManagerLimitEstimate estUp = persistentMap.getEstimatedUploadLimit(false);
            SpeedManagerLimitEstimate estDown = persistentMap.getEstimatedDownloadLimit(false);

            int downLimGuess = estDown.getBytesPerSec();
            float downConf = estDown.getMetricRating();
            int upLimGuess = estUp.getBytesPerSec();
            float upConf = estUp.getMetricRating();

            String name = persistentMap.getName();

            StringBuffer sb = new StringBuffer("new-ping-map: ");
            sb.append(" name=").append(name);
            sb.append(", down=").append(downLimGuess);
            sb.append(", down-conf=").append(downConf);
View Full Code Here

  }
 
  public SpeedManagerPingMapper
  createTransientPingMapper()
  {
    SpeedManagerPingMapper res = new SpeedManagerPingMapperImpl( this, "Transient", LONG_PERIOD_TICKS, true, true );
   
    transient_mappers.add( res );
   
    if ( transient_mappers.size() > 32 ){
     
View Full Code Here

    plot_views  = new plotView[mappers.length];
    zone_views  = new zoneView[mappers.length];
   
    for (int i=0;i<mappers.length;i++){
   
      SpeedManagerPingMapper mapper = mappers[i];
     
      TabItem plot_item = new TabItem(folder, SWT.NULL);
     
      plot_item.setText( "Plot " + mapper.getName());
     
      Canvas plotCanvas = new Canvas(folder,SWT.NO_BACKGROUND);
      gridData = new GridData(GridData.FILL_BOTH);
      plotCanvas.setLayoutData(gridData);
     
      plot_views[i] = new plotView( mapper, plotCanvas, labels, formatters );
     
      plot_item.setControl( plotCanvas );
     
      TabItem zones_item = new TabItem(folder, SWT.NULL);
      zones_item.setText( "Zones " + mapper.getName() );
     
      Canvas zoneCanvas = new Canvas(folder,SWT.NO_BACKGROUND);
      gridData = new GridData(GridData.FILL_BOTH);
      zoneCanvas.setLayoutData(gridData);
 
View Full Code Here

TOP

Related Classes of com.aelitis.azureus.core.speedmanager.SpeedManagerPingMapper

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.