- Name: Deepak Dinesh
- Organization: Django
- Mentors: David Smith and Carlton Gibson
- Project: Django Benchmarking
- Proposal: GSoC 2022 Django Benchmarking proposal
- Integrate the Airspeed Velocity benchmarking package into djangobench and run the benchmarks regularly
- Create a test harness using Locust and load-test different WSGI servers and ASGI servers to determine the effects of using ASGI instead of WSGI
- Write new benchmarks aimed at benchmarking the request-response cycle
- Create a template repository that can be used to add sample django projects and perform load-test using Locust
- Update the loadtest project in the Channels repository and use Locust to perform load-tests
-
-
Integrating Airspeed Velocity
Airspeed Velocity (asv) is a tool for benchmarking Python packages over their lifetime. Runtime, memory consumption, and even custom-computed values may be tracked. The results are displayed in an interactive web frontend that requires only a basic static webserver to host.
My mentor David Smith had already worked on integrating the airspeed velocity package into djangobench to make the benchmarking process more robust, I picked up his work by refactoring the existing benchmarks in the Pull requests
Some of the benchmarks in djangobench had not yet been migrated, so I migrated them
#21, #22, #23, #24, #26, #27, #28, #29, #30, #32, #33, #36
The result of the integration of Airspeed Velocity with djangobench can be seen in the django-asv repository.
-
Running the benchmarks regularly and publishing results to a website
Authored Github workflows in the django-asv repository to run the benchmarks regularly and commit the results back to the repository and publish the result to a website using Github pages
- PR - Run benchmarks regularly and publish results
- PR - Step added to cache Django during Github actions run
- PR - Benchmarking procedure changed to reduce noise
The results of benchmarks are published to a website -
-
Run the benchmarks on a pull request when it is labeled with the label "benchmark"
To run the benchmarks on a pull request so that performance issues can be identified before it is merged, my mentors suggested I add a workflow to run the benchmarks when a pull request made to the django repository was labeled with the label 'benchmark'.
-
Adding new benchmarks aimed at benchmarking the request-response cycle
In this pull request PR - #65 I added new benchmarks to benchmark the request-response cycle.
-
-
-
Template to perform load-testing on a Django project with different ASGI and WSSGI servers
Load testing was being performed by containerizing a Django project using Docker and then load-testing them using Locust, since many of the files being used to load test two different projects were similar my mentor Carlton Gibson suggested I create a template repository with the necessary files so that users can add other projects or use the template to perform load-testing easily
-
Updating the load-testing project in the Channels repository
An issue in the channels project pointed out the load-testing results had not been updated for a long time. I updated the load-testing project to use the Locust library to perform load-testing. This project is still being reviewed and I will add it to the channels repository later.
-
Create a test harness using Locust to load test different ASGI and WSGI servers
Using Docker I containerized Django projects having Django installed directly from pull requests and running on different ASGI and WSGI servers. Then I used Locust to create a test harness and was able to perform load testing on different servers to determine the effects of the said pull request on the performance
-
- Perform load-testing on ticket #32172
- Work on improving the template repository for load testing
- Work on improving the channels loadtest project
I would like to thank my mentors Carlton Gibson and David Smith for guiding me every step of the way and helping me complete my project successfully. Because of them, I was able to learn a lot about open-source contributions and Django.
- Blog: https://medium.com/@deepakdinesh13
- Discussions on project implementation: https://forum.djangoproject.com/t/django-benchmarking-project/13887
@django