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

feat(tools): add API performance test tool #2518

Merged
merged 6 commits into from
Aug 29, 2024
Merged

Conversation

hogo6002
Copy link
Contributor

@hogo6002 hogo6002 commented Aug 23, 2024

API perf test script:

  • Retrieve all bugs from the datastore and write them into JSON files.
  • Read bugs from the JSON files and generate queries randomly.
  • Send the generated queries asynchronously to the test instance.

@hogo6002 hogo6002 marked this pull request as ready for review August 26, 2024 00:12
Copy link
Contributor

@andrewpollock andrewpollock left a comment

Choose a reason for hiding this comment

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

This looks really cool!

To enhance the readability and maintainability of this, could you please:

Copy link
Contributor

@another-rex another-rex left a comment

Choose a reason for hiding this comment

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

Looks pretty good!

It would be good to add a script to generate the JSON file as well, and at least add a sample JSON file with a few entries so users know how to generate their own JSON file to test with.

tools/api-performance-test/performance.py Outdated Show resolved Hide resolved
tools/api-performance-test/performance.py Show resolved Hide resolved
tools/api-performance-test/performance.py Outdated Show resolved Hide resolved
tools/api-performance-test/performance.py Outdated Show resolved Hide resolved
Copy link
Contributor

@another-rex another-rex left a comment

Choose a reason for hiding this comment

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

Just need to add the function argument types, and it should be good to merge!

Could be useful to store the results to use to verify behavior changes, but that can be a follow up later.

tools/api-performance-test/performance.py Outdated Show resolved Hide resolved
@hogo6002 hogo6002 merged commit 34bd002 into google:master Aug 29, 2024
11 checks passed
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.

3 participants