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

Open
wants to merge 1 commit into
base: 25.lts.1+
Choose a base branch
from

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

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
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.

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