Skip to content

[v2] Add support for chunking performance tests, and architectural changes #9485

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

Draft
wants to merge 15 commits into
base: v2
Choose a base branch
from

Conversation

aemous
Copy link
Contributor

@aemous aemous commented May 9, 2025

Issue #, if available:

Description of changes:

  • Adds support for evenly chunking performance test cases and only running a specified chunk
  • Architectural changes to performance testing
    • Change Summarizer to return metric results in a new Metric data model, which includes additional data like description and unit.

Next big changes to consider:

  • low-hanging-fruit: switch binary-content key in begin_iteration to a 'mode' key. Update README as needed.
  • low-hanging-fruit: replace our quartile calculation with numpy calls.
  • low-hanging-fruit: move all Metric creation into Summarizer
  • Instead of returning a list of generators, can we use decorators on function definitions? Each case is a triple (setup, generate_definition, cleanup). Worst case scenario, can just switch to returning those triples.
    • idea: TestCase class with these 3 properties/functions. Can have @performancetest(setup=func, cleanup=func) decorator on a function that accepts iteration as arg and returns the case definition for a single iteration. The decorator would be in charge of wrapping it in a generator to generate/call the function for each iteration, passing the iteration to the function each time. To gather a suite's cases, we get all functions with this decorator. Optional args setup and cleanup will replace begin_iteration and end_iteration with those args.
  • Separate consume_case_results and provide_sequence_results to a separate BenchmarkResultHandler component. Put Summarizer as internal object in that component. When we need a benchmark suite with more complex data structure for storing + transforming results, we'd be overriding this component.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

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.

1 participant