{"id":18678861,"url":"https://github.com/alexhill/django_channels_test","last_synced_at":"2025-06-11T04:06:42.631Z","repository":{"id":146215646,"uuid":"314124677","full_name":"AlexHill/django_channels_test","owner":"AlexHill","description":null,"archived":false,"fork":false,"pushed_at":"2020-11-24T03:32:36.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-27T21:41:42.559Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AlexHill.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-19T03:21:36.000Z","updated_at":"2020-11-24T03:32:39.000Z","dependencies_parsed_at":"2023-10-28T17:15:06.910Z","dependency_job_id":null,"html_url":"https://github.com/AlexHill/django_channels_test","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexHill%2Fdjango_channels_test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexHill%2Fdjango_channels_test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexHill%2Fdjango_channels_test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexHill%2Fdjango_channels_test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlexHill","download_url":"https://codeload.github.com/AlexHill/django_channels_test/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239530630,"owners_count":19654319,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T09:41:39.335Z","updated_at":"2025-02-18T18:44:33.554Z","avatar_url":"https://github.com/AlexHill.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"This repository is a sample Django project to help test some issues with channels/uvicorn/gunicorn. It has a single view configured at `/delay/\u003cms\u003e/` which will time.sleep for `ms` and return 200.\n\n`load_test.py` takes two arguments, `concurrency` and `requests`. It will hit the `/delay/` endpoint with a sequence of request with random delays between 0 and 1 second. The random generator is seeded with 0 before each run, so subsequent runs test the same thing. It prints some statistics on the request results.\n\n\n# Install dependencies\n\nInstall the required dependencies with:\n\n```\npython3 -mvenv env\nenv/bin/pip install --upgrade pip setuptools\nenv/bin/pip install \"django\u003c3\" channels uvicorn gunicorn requests\n```\n\n# Test scenarios\n\n## 1. Channels returns 500s when workers \u003e 1\n\nStart the server:\n\n```\nmake asgi\n```\n\nHit the server with 10 requests and concurrency 10:\n\n```\nenv/bin/python load_test.py 10 10\n```\n\nObserve a bunch of errors in your web server log output.\n\nNow run ten requests with concurrency 1:\n\n```\nenv/bin/python load.test 1 10\n```\n\nAnd see that all is well.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexhill%2Fdjango_channels_test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexhill%2Fdjango_channels_test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexhill%2Fdjango_channels_test/lists"}