docs/doc/reference/com/google/android/exoplayer2/upstream/experimental/PercentileTimeToFirstByteEstimator.html
Package com.google.android.exoplayer2.upstream.experimental
All Implemented Interfaces:TimeToFirstByteEstimator
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classPercentileTimeToFirstByteEstimatorextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[TimeToFirstByteEstimator](../TimeToFirstByteEstimator.html "interface in com.google.android.exoplayer2.upstream")
Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
Implementation of TimeToFirstByteEstimator that returns a configured percentile of a sliding window of collected response times.
Fields | Modifier and Type | Field | Description |
| --- | --- | --- |
| static int | DEFAULT_MAX_SAMPLES_COUNT |
Deprecated.
The default maximum number of samples.
|
| static float | DEFAULT_PERCENTILE |
Deprecated.
The default percentile to return. |
Constructors | Constructor | Description |
| --- | --- |
| PercentileTimeToFirstByteEstimator() |
Deprecated.
Creates an instance that keeps up to DEFAULT_MAX_SAMPLES_COUNT samples and returns the DEFAULT_PERCENTILE percentile.
|
| PercentileTimeToFirstByteEstimator(int numberOfSamples, float percentile) |
Deprecated.
Creates an instance. |
All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| long | getTimeToFirstByteEstimateUs() |
Deprecated.
Returns the estimated time to first byte of the response body, in microseconds, or C.TIME_UNSET if no estimate is available.
|
| void | onTransferInitializing(DataSpec dataSpec) |
Deprecated.
Called when a transfer is being initialized.
|
| void | onTransferStart(DataSpec dataSpec) |
Deprecated.
Called when a transfer starts.
|
| void | reset() |
Deprecated.
Resets the estimator. |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public static final int DEFAULT_MAX_SAMPLES_COUNT
Deprecated.
The default maximum number of samples. See Also:Constant Field Values
-
public static final float DEFAULT_PERCENTILE
Deprecated.
The default percentile to return. See Also:Constant Field Values
-
public PercentileTimeToFirstByteEstimator()
Deprecated.
Creates an instance that keeps up to DEFAULT_MAX_SAMPLES_COUNT samples and returns the DEFAULT_PERCENTILE percentile.
-
public PercentileTimeToFirstByteEstimator(int numberOfSamples,
float percentile)
Deprecated.
Creates an instance.
Parameters:numberOfSamples - The maximum number of samples to be kept in the sliding window.percentile - The percentile for estimating the time to the first byte.
-
public long getTimeToFirstByteEstimateUs()
Deprecated.
Description copied from interface: TimeToFirstByteEstimator
Returns the estimated time to first byte of the response body, in microseconds, or C.TIME_UNSET if no estimate is available.
Specified by:getTimeToFirstByteEstimateUs in interface TimeToFirstByteEstimator
-
public void reset()
Deprecated.
Description copied from interface: TimeToFirstByteEstimator
Resets the estimator.
Specified by:reset in interface TimeToFirstByteEstimator
-
public void onTransferInitializing([DataSpec](../DataSpec.html "class in com.google.android.exoplayer2.upstream")dataSpec)
Deprecated.
Description copied from interface: TimeToFirstByteEstimator
Called when a transfer is being initialized.
Specified by:onTransferInitializing in interface TimeToFirstByteEstimatorParameters:dataSpec - Describes the data for which the transfer is initialized.
-
public void onTransferStart([DataSpec](../DataSpec.html "class in com.google.android.exoplayer2.upstream")dataSpec)
Deprecated.
Description copied from interface: TimeToFirstByteEstimator
Called when a transfer starts.
Specified by:onTransferStart in interface TimeToFirstByteEstimatorParameters:dataSpec - Describes the data being transferred.