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

Make query randomization more flexible #711

Open
peteralfonsi opened this issue Dec 12, 2024 · 2 comments
Open

Make query randomization more flexible #711

peteralfonsi opened this issue Dec 12, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@peteralfonsi
Copy link
Contributor

Is your feature request related to a problem? Please describe

Query randomization (#455) lets OSB automatically randomize the bounds of a range query in a controllable way, which is useful for testing cache performance. But it's currently hardcoded to only work on range queries with parameters gte/gt, lte/lt, and optionally format. This isn't ideal. For example, range queries like this don't usually enter the query cache, so testing the query cache requires more flexibility.

Describe the solution you'd like

For each operation, the user should be able to define the query name they are looking to randomize, and also specify the names of the parameters that should be randomized. For example, on a GeoPoint field named "pickup_location", they could randomize the following query:

"query": {
          "geo_bounding_box": {
            "pickup_location": {
              "top_left": [-74.27, 40.92],
              "bottom_right": [-73.68, 40.49]
            }
          }
        }

by specifying the query name geo_bounding_box and the parameter names top_left and bottom_right. This can be done by registering these values on an operation level in workload.py, like how standard value sources for the randomness are registered.

Describe alternatives you've considered

No response

Additional context

No response

@Divyaasm
Copy link

Hey @rishabh6788, @IanHoang Can you please take a look! Thanks

@IanHoang
Copy link
Collaborator

@peteralfonsi Thanks for contributing the PR. Will take a look when we free up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants