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

[TEST] Breaking performance tests #1632

Closed
wants to merge 31 commits into from
Closed

Conversation

peaBerberian
Copy link
Collaborator

@peaBerberian peaBerberian commented Jan 20, 2025

This is just a dummy PR to showcase what #1630 will do in case of a performance regression, most notably posting a github comment on this PR reporting the issue

@canalplus canalplus deleted a comment from github-actions bot Jan 20, 2025
@peaBerberian peaBerberian force-pushed the misc/do-not-merge-break-perf branch from e0ff5e8 to b51193a Compare January 20, 2025 15:00
@canalplus canalplus deleted a comment from github-actions bot Jan 20, 2025
@canalplus canalplus deleted a comment from github-actions bot Jan 20, 2025
@canalplus canalplus deleted a comment from github-actions bot Jan 20, 2025
@canalplus canalplus deleted a comment from github-actions bot Jan 20, 2025
@peaBerberian peaBerberian force-pushed the misc/do-not-merge-break-perf branch 3 times, most recently from a090fa5 to c63f694 Compare January 20, 2025 17:52
@canalplus canalplus deleted a comment from github-actions bot Jan 20, 2025
@canalplus canalplus deleted a comment from github-actions bot Jan 20, 2025
@canalplus canalplus deleted a comment from github-actions bot Jan 20, 2025
@peaBerberian peaBerberian force-pushed the misc/do-not-merge-break-perf branch from c63f694 to ee7a733 Compare January 20, 2025 19:05
While checking why some test on #1927 didn't pass I realized that this
was due to an actual real performance issue in multithread mode in rare
scenarios.

Basically, the `WorkerMain` module - whose role is to setup everything
worker-side in multithreaded mode - gives a hint of what could be
expected to be the first Period to load in the content.

However, it always gave the first Period - I guess we put a placeholder
when first writing the code and forgot to replace it until now.

As this is only a hint, this doesn't really led to any important issue,
the only visible problem - and why some integration tests failed
sometimes - were that the actual module relying on that information took
some time (the next playback observation so from 0 to 1 second) before
correcting the value.

In very specific scenarios, this could mean loading 1 second later than
usual (this wasn't really visible on initial load here but it happened
in tests for RELOADING cases).
This is an attempt at facilitating the writing of our performance tests,
which measure the time taken by key actions and whether we had
performance regressions for them (e.g. longer to load a content).

The idea is just that I move client-side test management code to a
`lib.js` file, and now original test files only contains steps and
take the more declarative format we're used with other kind of tests.

`lib.js` is then the one running them, sending results, handling
errors etc.

I also profited from this to add performance tests for multithread
content loading, track switching and reloading.
Based on #1629

This PR proposes two things:

  1. To run performance tests in CI for all PR

  2. Run performance tests against the base branch (and not against the
     last RxPlayer release)
@peaBerberian peaBerberian force-pushed the misc/do-not-merge-break-perf branch from ee7a733 to 1956545 Compare January 21, 2025 15:27
@peaBerberian peaBerberian force-pushed the misc/do-not-merge-break-perf branch from 67b2904 to 11151c0 Compare January 21, 2025 17:13
@canalplus canalplus deleted a comment from github-actions bot Jan 21, 2025
@canalplus canalplus deleted a comment from github-actions bot Jan 21, 2025
@canalplus canalplus deleted a comment from github-actions bot Jan 21, 2025
@peaBerberian peaBerberian added the skip-performance-checks Performance tests are not run on this PR label Jan 22, 2025
@peaBerberian peaBerberian added bug This is an RxPlayer issue (unexpected result when comparing to the API) API Relative to the RxPlayer's API ABR Relative to adaptive streaming (Adaptive BitRate) CMCD Concerns "Common Media Client Data" labels Jan 22, 2025
Copy link

Automated performance checks have been performed on commit 2d5aaaaab1cdf6ee66aeca6ee44e0bca238a74ba with the base branch dev.

Tests results

❌ Tests have failed.

Performance tests 1st run output

Worse performance for tests:

Name Mean median
loading 19.53ms -> 219.67ms (-200.134ms, z: 47.42626) 27.00ms -> 327.90ms

No significative change in performance for tests:

Name Mean median
seeking 10.64ms -> 11.24ms (-0.596ms, z: 4.20977) 11.25ms -> 11.10ms
audio-track-reload 25.86ms -> 25.85ms (0.004ms, z: 2.31217) 37.95ms -> 37.65ms
cold loading multithread 47.84ms -> 47.80ms (0.040ms, z: 14.15366) 70.05ms -> 68.70ms
seeking multithread 17.27ms -> 17.21ms (0.059ms, z: 1.60240) 10.35ms -> 10.35ms
audio-track-reload multithread 25.93ms -> 25.47ms (0.461ms, z: 6.10357) 38.10ms -> 37.65ms
hot loading multithread 15.54ms -> 15.15ms (0.391ms, z: 6.22842) 22.35ms -> 22.05ms

If you want to skip performance checks for latter commits, add the skip-performance-checks label to this Pull Request.


jobs:
perf-tests:
if: ${{ github.event.label.name == 'Performance checks' }}
if: ${{ !contains(github.event.issue.labels.*.name, 'skip-performance-checks') }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

it's github.event.pull_request here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

:O I must have copy-pasted something at some point without realizing

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

thanks

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That was it!!!

Copy link

Automated performance checks have been performed on commit 7f94a9f15e69a368f9b5ce4126ba431653e75ce9 with the base branch dev.

Tests results

❌ Tests have failed.

Performance tests 1st run output

Worse performance for tests:

Name Mean median
loading 19.82ms -> 219.70ms (-199.881ms, z: 47.42626) 27.60ms -> 328.35ms

No significative change in performance for tests:

Name Mean median
seeking 12.07ms -> 9.23ms (2.843ms, z: 5.13631) 11.40ms -> 11.25ms
audio-track-reload 26.39ms -> 26.30ms (0.091ms, z: 0.53836) 38.55ms -> 38.55ms
cold loading multithread 48.54ms -> 48.29ms (0.245ms, z: 12.10641) 71.10ms -> 69.90ms
seeking multithread 18.01ms -> 17.25ms (0.757ms, z: 2.13610) 10.50ms -> 10.35ms
audio-track-reload multithread 26.61ms -> 26.06ms (0.552ms, z: 6.55985) 39.15ms -> 38.40ms
hot loading multithread 16.27ms -> 15.69ms (0.578ms, z: 10.37621) 23.55ms -> 22.80ms

If you want to skip performance checks for latter commits, add the skip-performance-checks label to this Pull Request.

@peaBerberian peaBerberian removed bug This is an RxPlayer issue (unexpected result when comparing to the API) API Relative to the RxPlayer's API ABR Relative to adaptive streaming (Adaptive BitRate) skip-performance-checks Performance tests are not run on this PR CMCD Concerns "Common Media Client Data" labels Jan 22, 2025
Copy link

Automated performance checks have been performed on commit a7dcc4ae89bdb21c93f25e560a40221c8f285589 with the base branch dev.

Tests results

❌ Tests have failed.

Performance tests 1st run output

Worse performance for tests:

Name Mean median
loading 19.25ms -> 219.05ms (-199.802ms, z: 47.42626) 26.70ms -> 327.15ms

No significative change in performance for tests:

Name Mean median
seeking 17.22ms -> 9.79ms (7.426ms, z: 3.41454) 11.25ms -> 11.10ms
audio-track-reload 25.77ms -> 25.54ms (0.232ms, z: 3.93339) 37.65ms -> 37.35ms
cold loading multithread 47.44ms -> 46.49ms (0.956ms, z: 12.96520) 69.45ms -> 68.25ms
seeking multithread 15.21ms -> 17.19ms (-1.981ms, z: 0.79630) 10.35ms -> 10.35ms
audio-track-reload multithread 25.68ms -> 25.51ms (0.165ms, z: 3.41037) 37.80ms -> 37.50ms
hot loading multithread 15.14ms -> 15.14ms (0.005ms, z: 1.88086) 21.90ms -> 21.75ms

Performance tests 2nd run output

Worse performance at second attempt for tests:

Name Mean median
loading 19.25ms -> 219.05ms (-199.802ms, z: 47.42626) 26.70ms -> 327.15ms

No significative change in performance for tests:

Name Mean median
seeking 17.22ms -> 9.79ms (7.426ms, z: 3.41454) 11.25ms -> 11.10ms
audio-track-reload 25.77ms -> 25.54ms (0.232ms, z: 3.93339) 37.65ms -> 37.35ms
cold loading multithread 47.44ms -> 46.49ms (0.956ms, z: 12.96520) 69.45ms -> 68.25ms
seeking multithread 15.21ms -> 17.19ms (-1.981ms, z: 0.79630) 10.35ms -> 10.35ms
audio-track-reload multithread 25.68ms -> 25.51ms (0.165ms, z: 3.41037) 37.80ms -> 37.50ms
hot loading multithread 15.14ms -> 15.14ms (0.005ms, z: 1.88086) 21.90ms -> 21.75ms

If you want to skip performance checks for latter commits, add the skip-performance-checks label to this Pull Request.

@peaBerberian peaBerberian added the work-in-progress This Pull Request or issue is not finished yet label Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
work-in-progress This Pull Request or issue is not finished yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants