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

Performance Tests for Login and Home Pages by using Playwright #119681

Merged
merged 78 commits into from
Jan 18, 2022
Merged

Performance Tests for Login and Home Pages by using Playwright #119681

merged 78 commits into from
Jan 18, 2022

Conversation

suchcodemuchwow
Copy link
Contributor

@suchcodemuchwow suchcodemuchwow commented Nov 24, 2021

This PR aims to experiment different libraries, tools and options for performance test environment which we aim to see stable results in each CI build.

  • Rename and reduce the number of environment variables for performance test CI job
    • ITERATION_COUNT_ENV => PERF_TEST_COUNT
    • DISABLE_CACHE, TEST_RUNNER, TEST_THROTTLE_NETWORK removed
  • Use c2-16 queue for performance tests
  • Run performance tests by running ES and Kibana separately
  • Add warmup phase to performance tests (Not reported to APM). APM Label: PERF_TEST_PHASE
  • Add playwright dependency
  • Throttle network speed ( downloadThroughput: 750.000 B/s, uploadThroughput: 750.000 B/s, latency: 100 ms )
  • Disable cache by using - page.route (‘**’, ….)
  • Login and Home pages performance tests.

@suchcodemuchwow suchcodemuchwow added chore v8.0.0 release_note:skip Skip the PR/issue when compiling release notes auto-backport Deprecated - use backport:version if exact versions are needed v7.16.0 v8.1.0 labels Nov 24, 2021
@suchcodemuchwow
Copy link
Contributor Author

@elasticmachine merge upstream

@suchcodemuchwow suchcodemuchwow marked this pull request as ready for review November 29, 2021 16:11
@suchcodemuchwow suchcodemuchwow requested a review from a team as a code owner November 29, 2021 16:11
@lizozom
Copy link
Contributor

lizozom commented Nov 30, 2021

I'd love to track this PR in the main meta issue
Is this and #117861 two different tests?

Copy link
Contributor

@tylersmalley tylersmalley left a comment

Choose a reason for hiding this comment

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

Some minor changes, overall looking good!

Cavit Baturalp Gurdin added 2 commits January 12, 2022 14:41
… github.com:suchcodemuchwow/kibana into 2021-11-25-synthetics-perf-test-login-and-home-page
@suchcodemuchwow suchcodemuchwow changed the title Performance Tests for Login and Home Pages by using Synthetics Performance Tests for Login and Home Pages by using Playwright Jan 13, 2022
@suchcodemuchwow suchcodemuchwow self-assigned this Jan 13, 2022
@LeeDr
Copy link

LeeDr commented Jan 13, 2022

@suchcodemuchwow could you guide me to where the results of the performance tests are?

@dmlemeshko
Copy link
Member

dmlemeshko commented Jan 13, 2022

Run performance tests by running ES and Kibana separately

Hey @suchcodemuchwow Cool stuff! I can see that you start them separately, but ES and Kibana still share the same machine/resources, right? What is the reason to keep ES running longer?

@suchcodemuchwow
Copy link
Contributor Author

suchcodemuchwow commented Jan 13, 2022

Run performance tests by running ES and Kibana separately

Hey @suchcodemuchwow Cool stuff! I can see that you start them separately, but ES and Kibana still share the same machine/resources, right? What is the reason to keep ES running longer?

Hey @dmlemeshko, we wanted to keep ES running and have two phases of kibana tests running. We have 1 WARMUP and 1 TEST phase. We found out that in first (WARMUP) phase we have longer durations compared to subsequent runs. 2,3,4 ... is quite similar and we decided to only have 1 TEST phase.
Here where we are running these tests.

@suchcodemuchwow
Copy link
Contributor Author

Hey @LeeDr, we had bunch of builds in this PR because of experimentation, but below one is the most recent one:
APM UI
Performance Dashboard

@suchcodemuchwow
Copy link
Contributor Author

@LeeDr, @dmlemeshko could you please check my comments. We would like to merge this PR so we can run our daily jobs.

Copy link
Member

@dmlemeshko dmlemeshko left a comment

Choose a reason for hiding this comment

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

LGTM

@suchcodemuchwow
Copy link
Contributor Author

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @suchcodemuchwow

@suchcodemuchwow suchcodemuchwow merged commit eeb5efc into elastic:main Jan 18, 2022
@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.0 Backport failed because of merge conflicts
7.17 Backport failed because of merge conflicts

How to fix

Re-run the backport manually:

node scripts/backport --pr 119681

Questions ?

Please refer to the Backport tool documentation

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create backports run node scripts/backport --pr 119681 or prevent reminders by adding the backport:skip label.

@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Jan 20, 2022
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create backports run node scripts/backport --pr 119681 or prevent reminders by adding the backport:skip label.

1 similar comment
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create backports run node scripts/backport --pr 119681 or prevent reminders by adding the backport:skip label.

suchcodemuchwow added a commit that referenced this pull request Jan 24, 2022
…) (#123619)

add performance tests for Login and Home pages

- [x] Rename and reduce the number of environment variables for performance test CI job
  - [x] ITERATION_COUNT_ENV =>  PERF_TEST_COUNT
  - [x] DISABLE_CACHE, TEST_RUNNER, TEST_THROTTLE_NETWORK removed
- [x] Use c2-16 queue for performance tests
- [x] Run performance tests by running ES and Kibana separately
- [x] Add warmup phase to performance tests (Not reported to APM). APM Label: PERF_TEST_PHASE
- [x] Add playwright dependency
- [x] Throttle network speed ( downloadThroughput: 750.000 B/s, uploadThroughput: 750.000 B/s, latency: 100 ms )
- [x] Disable cache by using - page.route (‘**’, ….)
- [x] Login and Home pages performance tests.

(cherry picked from commit eeb5efc)

# Conflicts:
#	x-pack/test/performance/config.playwright.ts
@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Jan 24, 2022
suchcodemuchwow added a commit that referenced this pull request Jan 24, 2022
…) (#123620)

add performance tests for Login and Home pages

- [x] Rename and reduce the number of environment variables for performance test CI job
  - [x] ITERATION_COUNT_ENV =>  PERF_TEST_COUNT
  - [x] DISABLE_CACHE, TEST_RUNNER, TEST_THROTTLE_NETWORK removed
- [x] Use c2-16 queue for performance tests
- [x] Run performance tests by running ES and Kibana separately
- [x] Add warmup phase to performance tests (Not reported to APM). APM Label: PERF_TEST_PHASE
- [x] Add playwright dependency
- [x] Throttle network speed ( downloadThroughput: 750.000 B/s, uploadThroughput: 750.000 B/s, latency: 100 ms )
- [x] Disable cache by using - page.route (‘**’, ….)
- [x] Login and Home pages performance tests.

(cherry picked from commit eeb5efc)

# Conflicts:
#	x-pack/test/performance/config.playwright.ts
CABLE_5MBPS: { DOWNLOAD: 5 * kB * sec, UPLOAD: 1 * kB * sec, LATENCY: 0.28 * sec },
CABLE_8MBPS: { DOWNLOAD: 8 * kB * sec, UPLOAD: 2 * kB * sec, LATENCY: 0.1 * sec },
WIFI: { DOWNLOAD: 30 * kB * sec, UPLOAD: 15 * kB * sec, LATENCY: 0.002 * sec },
CLOUD_USER: { DOWNLOAD: 6 * MBps, UPLOAD: 6 * MBps, LATENCY: 0.1 * sec },
Copy link
Contributor

Choose a reason for hiding this comment

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

Anyone know why we removed these? I was looking for a way to throttle during a functional test to confirm a loading theory. Seems like this might have worked and I was about to add 3G_SLOW back. But maybe I shouldn't?

Copy link
Contributor

@spalger spalger Jun 24, 2022

Choose a reason for hiding this comment

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

We removed them because they were inaccurate and finding information that accurately describes the speeds used by the browser profiles was really hard, so we punted on it and only worried about the profile that we actually use.

Copy link
Contributor

Choose a reason for hiding this comment

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

Gotcha. #135103 has the snippet I ended up using instead (to slow a test down enough to fail). Maybe this sort of thing would be better as a helper rather than webdriver-init-time setting 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed chore release_note:skip Skip the PR/issue when compiling release notes v7.17.0 v8.0.0 v8.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants