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 benchmark for async tree workloads #187

Merged
merged 8 commits into from May 16, 2022

Conversation

arielin3
Copy link
Contributor

@arielin3 arielin3 commented Apr 27, 2022

What

Add a benchmark for testing async workloads, specifically an async tree workload that simulates simpler versions of a typical Instagram endpoint. ("typical implementation of endpoint in IG is an async function that in turn calls into numerous other async functions to generate an output." - see context below)

Motivation/Context

See python/cpython#91121

Testing

Running pyperformance locally:

% python3 -m pyperformance list
'<default>' benchmarks:
- 2to3
- async_tree
- async_tree_cpu_io_mixed
- async_tree_io
- async_tree_memoization
- chameleon
- chaos
...
% python3 -m pyperformance run -o ~/python_efficiency_hackamonth/pyperformance_async_tree_output.json --benchmarks=async_tree,async_tree_cpu_io_mixed,async_tree_memoization,async_tree_io
Python benchmark suite 1.0.5

Creating the virtual environment /Users/arielin/python_efficiency_hackamonth/pyperformance_git/pyperformance/venv/cpython3.10-38b51ccaf402-compat-c0d88e07feb9

...

Performance version: 1.0.5
Python version: 3.10.4 (64-bit) revision 9d38120e33
Report on macOS-12.3.1-x86_64-i386-64bit
Number of logical CPUs: 16
Start date: 2022-05-04 18:06:49.877751
End date: 2022-05-04 18:13:51.586338

### async_tree_none ###
Mean +- std dev: 830 ms +- 59 ms

### async_tree_cpu_io_mixed ###
Mean +- std dev: 1.10 sec +- 0.05 sec

### async_tree_io ###
Mean +- std dev: 2.00 sec +- 0.05 sec

### async_tree_memoization ###
Mean +- std dev: 963 ms +- 37 ms

(EDIT: Testing updated on 5/4 after rename changes)

doc/benchmarks.rst Outdated Show resolved Hide resolved
Copy link
Member

@ericsnowcurrently ericsnowcurrently left a comment

Choose a reason for hiding this comment

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

Mostly LGTM.

Copy link
Member

@ericsnowcurrently ericsnowcurrently left a comment

Choose a reason for hiding this comment

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

I'll merge this tomorrow, after you've had a change to make any final changes.

@arielin3
Copy link
Contributor Author

@ericsnowcurrently Thanks so much for the review! Updated and addressed all the comments :)

@arielin3
Copy link
Contributor Author

@ericsnowcurrently It looks like the most recent test failure (test / ubuntu-latest - 3.11-dev) is due to the "sqlalchemy" benchmarks and not async tree related - it failed at creating venvs for that benchmarks, at

(43/53) creating venv for benchmark (sqlalchemy_declarative)
(44/53) creating venv for benchmark (sqlalchemy_imperative)

Are you able to rerun the failed test?

@ericsnowcurrently
Copy link
Member

Yeah, it's not this PR.

@ericsnowcurrently ericsnowcurrently merged commit 6e7b445 into python:main May 16, 2022
@ericsnowcurrently
Copy link
Member

Thanks for working on this!

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.

None yet

3 participants