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 system check benchmark #80

Merged
merged 1 commit into from
Feb 24, 2024

Conversation

adamchainz
Copy link
Member

@adamchainz adamchainz commented Feb 23, 2024

As requested by @charettes on Django Ticket #35246 for covering my recent improvements to system check performance.

I ran the benchmark locally on recent commits and got this nice graph out:

Xnapper-2024-02-23-22 37 04

The precipitous drop is due to django/django@28a3fbe , which fixed O(n) execution of the URL custom error handler checks.

The benchmark environment doesn’t run every system check because it doesn’t install all contrib apps, notably the admin, and doesn’t use some features like GenericForeignKey. It also doesn’t have enough models, model inheritance, or relations to trigger some of the slownesses I’ve worked on. But I hope this benchmark is a good start.

@charettes
Copy link
Member

Thanks a ton @adamchainz, I think it's fine if it doesn't cover everything after all most projects don't either.

@smithdc1 smithdc1 merged commit 8145e27 into django:main Feb 24, 2024
2 checks passed
@adamchainz adamchainz deleted the system_check_benchmark branch February 24, 2024 11:12
@adamchainz
Copy link
Member Author

Cheers @smithdc1 ! It seems there’s no way to trigger benchmarks on GHA for the previous commits, so the improvements so far won’t be recorded outside my screenshot above. But at least we have a defense against future regressions :)

@smithdc1
Copy link
Member

It seems there’s no way to trigger benchmarks on GHA for the previous commits

Yes, this is a bit of a shame, refs: #47

But at least we have a defense against future regressions :)

Future regressions (even small ones) should be easier to track going forward. Something changed which means running them in GHA is now far more repeatable than before. https://django.github.io/django-asv/#req_resp_benchmarks.http_methods.benchmark.HttpMethods.time_get_method.

I wonder if the benchmark runner on django/django will also be more reliable now because of that 🤔

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