Class SpeedManagerAlgorithmProviderPingMap

    • Field Detail

      • timeSinceLastUpdate

        private long timeSinceLastUpdate
      • consecutiveUpticks

        private int consecutiveUpticks
      • consecutiveDownticks

        private int consecutiveDownticks
      • lastMetricValue

        private float lastMetricValue
      • numIntervalsBetweenCal

        private static int numIntervalsBetweenCal
      • skipIntervalAfterAdjustment

        private static boolean skipIntervalAfterAdjustment
      • pingTimeList

        private java.util.List pingTimeList
      • hadAdjustmentLastInterval

        private boolean hadAdjustmentLastInterval
      • intervalCount

        private int intervalCount
      • sessionMaxUploadRate

        int sessionMaxUploadRate
    • Method Detail

      • logCurrentData

        private void logCurrentData​(int downRate,
                                    int currDownLimit,
                                    int upRate,
                                    int currUploadLimit)
        log "curr-data" line to the AutoSpeed-Beta file.
        Parameters:
        downRate - -
        currDownLimit - -
        upRate - -
        currUploadLimit - -
      • pingSourceFound

        public void pingSourceFound​(SpeedManagerPingSource source,
                                    boolean is_replacement)
        Called when a new source of ping times has been found
        Specified by:
        pingSourceFound in interface SpeedManagerAlgorithmProvider
        Parameters:
        source - -
        is_replacement - One of the initial sources or a replacement for a failed one
      • endLimitTesting

        private void endLimitTesting()
      • logLimitStatus

        private void logLimitStatus()
        Log the limit status. Max, Min and Conf. log("limits:down-max:down-min:down-conf:up-max:up-min:up-conf");
      • calculatePingMetric

        private boolean calculatePingMetric()
        Variance PingMap data is the metrics used. Calculate it here.
        Returns:
        - true if should exit early from the caluculate method.
      • logNewLimits

        private void logNewLimits​(SMUpdate update)
      • setNewLimits

        private void setNewLimits​(SMUpdate update)
        Just update the limits.
        Parameters:
        update - - SMUpdate
      • determineSignalStrength

        private float determineSignalStrength​(float lastMetric)
      • convertTestMetricToSignal

        private float convertTestMetricToSignal​(float testMetric)
        Parameters:
        testMetric - - float -1.0f to +1.0f
        Returns:
        signal as float with 0.0 meaning don't make an adjustment.
      • consectiveMultiplier

        private float consectiveMultiplier()
        The longer were get the same signal the stronger it is. On upticks however we only increase the rates when if the upload or download is saturated.
        Returns:
        -
      • calculateUpTickMultiple

        private float calculateUpTickMultiple​(int c)
        Want to rise much slower then drop.
        Parameters:
        c - - number of upsignals recieved in a row
        Returns:
        - multiple factor.
      • calculateDownTickMultiple

        private float calculateDownTickMultiple​(int c)
        Want to drop rate faster then increase.
        Parameters:
        c - -
        Returns:
        -
      • log

        protected void log​(java.lang.String str)