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

[telemetry] Add telemetry to SbMedia functions #4101

Merged
merged 1 commit into from
Sep 30, 2024

Conversation

borongc
Copy link
Contributor

@borongc borongc commented Sep 10, 2024

Adding additional Media Telemetry to cover SbMedia functions.

The rough range of each function:

  1. SbMediaIsBufferPoolAllocateOnDemand(): 1us to 2us
  2. SbMediaGetInitialBufferCapacity(): 1us to 2us
  3. SbMediaGetBufferAllocationUnit(): 1us to 2us
  4. SbMediaGetAudioBufferBudget(): 1us to 0.82ms
  5. SbMediaGetBufferGarbageCollectionDurationThreshold(): 1us to 0.91ms
  6. SbMediaGetVideoBufferBudget(): 1us to 0.123ms

SbMediaGetProgressiveBufferBudget() should be expected to be similar to SbMediaGetVideoBufferBudget().

b/303328238

@borongc borongc force-pushed the telemetry_sbmedia branch 2 times, most recently from 712ec51 to d669f5e Compare September 12, 2024 15:34
Copy link
Contributor

@joeltine joeltine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI I don't think your PR description of ranges matches what the histogram ranges actually are.

@borongc
Copy link
Contributor Author

borongc commented Sep 12, 2024

FYI I don't think your PR description of ranges matches what the histogram ranges actually are.

This is a very conservative range, as we saw in production, a simple getter function, like Cobalt.Media.HTMLMediaElement.CanPlayType.Timing, can sometimes be up to 5ms, but the majority is about 3us.

Moreover, if they are actually in the order of few microseconds, it should be fine because it indicates that it is not critical to improve them at this moment. If we use the range of [1us, 5ms], it can still capture the range.

In other words, it is okay for right-skewed histogram for us, but we cannot accept the left-skewed histogram.

@borongc borongc force-pushed the telemetry_sbmedia branch 2 times, most recently from 80ae39c to 6b4c068 Compare September 28, 2024 04:19
@borongc borongc enabled auto-merge (squash) September 28, 2024 04:19
Adding additional Media Telemetry to cover SbMedia functions.

The rough range of each function:
1. SbMediaIsBufferPoolAllocateOnDemand(): 1us to 2us
2. SbMediaGetInitialBufferCapacity(): 1us to 2us
3. SbMediaGetBufferAllocationUnit(): 1us to 2us

b/303328238
@borongc borongc merged commit 914a1b7 into youtube:25.lts.1+ Sep 30, 2024
300 of 301 checks passed
@borongc borongc deleted the telemetry_sbmedia branch September 30, 2024 20:16
johnxwork added a commit that referenced this pull request Oct 15, 2024
borongc pushed a commit that referenced this pull request Oct 15, 2024
borongc pushed a commit that referenced this pull request Oct 15, 2024
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.

3 participants