TimeToFirstByteEstimator
@UnstableApi
public interface TimeToFirstByteEstimator
ExponentialWeightedAverageTimeToFirstByteEstimator |
Implementation of |
PercentileTimeToFirstByteEstimator |
Implementation of |
Provides an estimate of the time to first byte of a transfer.
Summary
Public methods |
|
|---|---|
abstract long |
Returns the estimated time to first byte of the response body, in microseconds, or |
abstract void |
onTransferInitializing(DataSpec dataSpec)Called when a transfer is being initialized. |
abstract void |
onTransferStart(DataSpec dataSpec)Called when a transfer starts. |
abstract void |
reset()Resets the estimator. |
Public methods
getTimeToFirstByteEstimateUs
abstract long getTimeToFirstByteEstimateUs()
Returns the estimated time to first byte of the response body, in microseconds, or TIME_UNSET if no estimate is available.
onTransferInitializing
abstract void onTransferInitializing(DataSpec dataSpec)
Called when a transfer is being initialized.
| Parameters | |
|---|---|
DataSpec dataSpec |
Describes the data for which the transfer is initialized. |
onTransferStart
abstract void onTransferStart(DataSpec dataSpec)
Called when a transfer starts.
| Parameters | |
|---|---|
DataSpec dataSpec |
Describes the data being transferred. |