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

Added database cache benchmark #81

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

Hisham-Pak
Copy link

This pull request adds database cache benchmarks as requested by @sarahboyce here

After running on these commits and one local commit showing improved set_many

asv run -b cache_benchmarks 097e3a70c1481ee7b042b2edd91b2be86fb7b5b6^!
asv run -b cache_benchmarks bb61f0186d5c490caa44f3e3672d81e14414d33c^!
asv run -b cache_benchmarks 9c19aff7c7561e3a82978a272ecdaad40dda5c00^!
asv run -b cache_benchmarks 17df72114e222d63c2af9ed9780583f4cb0689eb^!
asv run -b cache_benchmarks 4b82578a6045746e7c470b7881dfcf182fd57048^!
asv run -b cache_benchmarks 5a8e8f80bb82a867eab7e4d9d099f21d0a976d22^!

I get these graphs:
set_many
cache_benchmarks

Copy link
Contributor

@sarahboyce sarahboyce left a comment

Choose a reason for hiding this comment

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

LGTM
@smithdc1 maybe you can review also 🙏

Copy link
Member

@smithdc1 smithdc1 left a comment

Choose a reason for hiding this comment

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

Hi all a few questions below. My main concern is how much work is being done by the random_*() methods vs what we're actually trying to benchmark. We can test for that using asv profile and if significant we should look to move that effort outside of the benchmark.

results/benchmarks.json Outdated Show resolved Hide resolved
benchmarks/cache_benchmarks/database_cache/benchmark.py Outdated Show resolved Hide resolved
from ...utils import bench_setup


class DatabaseCacheBackend:
Copy link
Member

Choose a reason for hiding this comment

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

Do you think we could add coverage for the some of the other backends too? The benchmarks would be the same, it's just a different setting? 🤔

Copy link
Author

Choose a reason for hiding this comment

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

Can we do this in separate pull request?

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