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

monitor+server: Record million pixels processed metric #1899

Merged
merged 3 commits into from May 25, 2021

Conversation

yondonfu
Copy link
Member

@yondonfu yondonfu commented May 21, 2021

What does this pull request do? Explain your changes. (required)

Adds a million pixels processed metric. For now, this is only recorded on B by taking the total pixel count for a set of transcoded results, dividing it by 1m and then recording the result. This metric is helpful for monitoring pixel throughput on a B while also monitoring payment/ticket throughput since the latter should be based on the former.

The risk of overflow while using a float64 to record the metric should be minimal. Consider the following example:

  • 179729280000 pixels per hour for a stream with 240p30fps, 360p30fps, 480p30fps, 720p30fps outputs (does not factor in decoded pixels from the input)
  • 179729280000 / 1000000 = 179729.28 million pixels per hour
  • 179729.28 million pixels per hour * 24 hours * 365 days = 1574428492.8 million pixels per year
  • 1574428492.8 million pixels per year * 1000000 streams = 1574428492800000.0

So, with 1000000 streams running 24/7 for an entire year the million pixels value should still be below the max float64 value.

Specific updates (required)

  • Add mil_pixels_processed metric in the monitor package
  • Record mil_pixels_processed metric on B after counting the pixels in the transcoded results

How did you test each of these updates (required)

Manually.

Does this pull request close any open issues?

N/A

Checklist:

@yondonfu yondonfu changed the title server: Add debug log for pixels on B monitor+server: Record million pixels processed metric May 24, 2021
@yondonfu yondonfu marked this pull request as ready for review May 25, 2021 20:17
Copy link
Contributor

@darkdarkdragon darkdarkdragon left a comment

Choose a reason for hiding this comment

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

LGTM

@yondonfu yondonfu merged commit fe6f725 into master May 25, 2021
@yondonfu yondonfu deleted the yf/payment-logging branch May 25, 2021 21:59
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