Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

calculateThroughputByChunkData() fixes #4130

Conversation

piersoh
Copy link
Contributor

@piersoh piersoh commented Feb 22, 2023

Two fixes to the calculateThroughputByChunkData() implementation:

  1. Add reset of shortDurationStartTime after chunkThroughputs.push()

    • shortDurationStartTime needs to be reset after a
      chunkThroughputs.push() otherwise it can lead to spurious
      'short duration' throughput measurements - because a previously set
      shortDurationStartTime can end up being incorrectly used if a subsequent
      data arrival has a zero chunkDownloadTime.
    • Moved reset of shortDurationBytesReceived to more optimal location so
      it is only reset when shortDurationStartTime === 0
  2. Included length of last piece of short duration data in throughput calculation

    • The length (byte count) of the final piece of 'short duration'
      data should be included in the throughput calculation otherwise
      it is ignored which leads to an underestimate.

- shortDurationStartTime need to be reset after a
  chunkThroughputs.push() otherwise it can lead to spurious
  'short duration' throughput measurements.
- Moved reset of shortDurationBytesReceived to more optimal location so
  it is only reset when shortDurationStartTime === 0
…lculation

- The length (byte count) of the final piece of 'short duration'
  data should be included in the throughput calculation otherwise
  it is ignored which leads to an underestimate.
@piersoh piersoh changed the title Calculate throughput by chunk data fixes calculateThroughputByChunkData() fixes Feb 23, 2023
@piersoh piersoh changed the title calculateThroughputByChunkData() fixes calculateThroughputByChunkData() fixes Feb 23, 2023
@dsilhavy dsilhavy added this to the 4.7.0 milestone Feb 23, 2023
@dsilhavy dsilhavy self-requested a review February 23, 2023 19:48
@dsilhavy dsilhavy merged commit 7330851 into Dash-Industry-Forum:development Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants