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

Add common perftest classes for data generation + use in confluence to demonstrate #1590

Merged

Conversation

artem-shelkovnikov
Copy link
Member

@artem-shelkovnikov artem-shelkovnikov commented Sep 6, 2023

Part of https://github.com/elastic/enterprise-search-team/issues/3397

Adding a series of classes that can be used to have common setup for performance tests. WeightedFakeProvider class allows to have a class that returns random small/medium/large/extra_large text/html files with given distribution.

For example, by default distribution is [0.58, 0.3, 0.1, 0.02], meaning that small items will be returned with 58% chance, medium-sized items with 30% chance, large with 10% and extra_large with 2%.

The idea is to have this class used in all functional tests to have uniform test setup, so that we could do better job at estimating the memory consumption of each connector.

One thing to consider: I had to change all python <FIXTURE_FILE.py> to bin/python <FIXTURE_FILE.py> for it to work, because the shared class is inside of the connectors library, and this library is not installed locally - it's installed inside the venv. So to use it, we need to use python that's distributed in venv as well. IMO it makes sense.

Checklists

Pre-Review Checklist

  • this PR has a meaningful title
  • this PR links to all relevant github issues that it fixes or partially addresses
  • if there is no GH issue, please create it. Each PR should have a link to an issue
  • this PR has a thorough description
  • Covered the changes with automated tests
  • Tested the changes locally
  • Added a label for each target release version (example: v7.13.2, v7.14.0, v8.0.0)

@artem-shelkovnikov artem-shelkovnikov marked this pull request as ready for review September 7, 2023 14:23
@artem-shelkovnikov artem-shelkovnikov requested a review from a team September 7, 2023 14:23
@artem-shelkovnikov artem-shelkovnikov enabled auto-merge (squash) September 8, 2023 13:02
@artem-shelkovnikov
Copy link
Member Author

Started the migration of other sources in #1607. Did it for ABS and Dropbox there

seanstory
seanstory previously approved these changes Sep 8, 2023
@seanstory
Copy link
Member

Unclear to me why CI is failing, we'll need to dig into that.

@artem-shelkovnikov artem-shelkovnikov requested a review from a team September 27, 2023 09:40
Copy link
Contributor

@navarone-feekery navarone-feekery left a comment

Choose a reason for hiding this comment

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

LGTM!

@artem-shelkovnikov artem-shelkovnikov merged commit a7402a3 into main Sep 28, 2023
@artem-shelkovnikov artem-shelkovnikov deleted the artem/add-common-perftest-class-and-use-in-confluence branch September 28, 2023 11:26
@github-actions
Copy link

💔 Failed to create backport PR(s)

The backport operation could not be completed due to the following error:
There are no branches to backport to. Aborting.

The backport PRs will be merged automatically after passing CI.

To backport manually run:
backport --pr 1590 --autoMerge --autoMergeMethod squash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants