{"id":15699574,"url":"https://github.com/alexxit/pyasyncweb-tests","last_synced_at":"2025-03-30T14:27:19.037Z","repository":{"id":104871759,"uuid":"116803215","full_name":"AlexxIT/pyasyncweb-tests","owner":"AlexxIT","description":null,"archived":false,"fork":false,"pushed_at":"2018-01-09T17:00:46.000Z","size":6,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-05T16:16:46.020Z","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/AlexxIT.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":"2018-01-09T10:44:47.000Z","updated_at":"2023-12-02T14:02:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"7abe1405-42c8-4a03-b5e5-50118850b511","html_url":"https://github.com/AlexxIT/pyasyncweb-tests","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/AlexxIT%2Fpyasyncweb-tests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexxIT%2Fpyasyncweb-tests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexxIT%2Fpyasyncweb-tests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexxIT%2Fpyasyncweb-tests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlexxIT","download_url":"https://codeload.github.com/AlexxIT/pyasyncweb-tests/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246330358,"owners_count":20760089,"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-10-03T19:40:58.376Z","updated_at":"2025-03-30T14:27:18.992Z","avatar_url":"https://github.com/AlexxIT.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pyasyncweb-tests\n\n**Problem**: python web frameworks with [uvloop] perform a query with higher \npriority than return the result of active requests. Active requests accumulate \nand the result to the user is delayed.\n\nThere is no problem with the standard loop.\n\n[uvloop]: https://github.com/MagicStack/uvloop \n\n**Note:**\n\njapronto works only with uvloop \u003c= 0.8.1\n\n**Install:**\n\n```\nsudo pip3 install -r requirements.txt\n```\n\n**Run tests:**\n\n`python3 test.py` or `google-chrome test.html`\n\n## Test results (test.py)\n\naiohttp (good)\n\n```\n5.01238489151001\n10.014051675796509\n15.02192735671997\n20.02768564224243\n```\n\naiohttp_uvloop (bad)\n\n```\n5.012973785400391\n20.03240466117859\n20.03162956237793\n20.031569719314575\n```\n\njapronto (bad)\n\n```\n5.012808561325073\n20.0286066532135\n20.029279708862305\n20.03039288520813\n```\n\nsanic (bad)\n\n```\n5.01204514503479\n20.024916887283325\n20.024645805358887\n20.02467703819275\n```\n\nsanic default loop (good)\n\n```\n5.012679100036621\n10.018367290496826\n15.025014400482178\n20.030269861221313\n```\n\n# Test2\n\ndefault loop\n\n```\n$ python3 main_builtin.py \n2018-01-09 19:22:41,834 INFO [__main__] Start connection\n2018-01-09 19:22:41,835 INFO [__main__] Receive\n2018-01-09 19:22:46,842 INFO [__main__] Write\n2018-01-09 19:22:46,842 INFO [__main__] Close\n2018-01-09 19:22:46,842 INFO [__main__] After Close\n2018-01-09 19:22:46,843 INFO [__main__] Start connection\n2018-01-09 19:22:46,844 INFO [__main__] Start connection\n2018-01-09 19:22:46,844 INFO [__main__] Receive\n2018-01-09 19:22:51,850 INFO [__main__] Write\n2018-01-09 19:22:51,851 INFO [__main__] Close\n2018-01-09 19:22:51,851 INFO [__main__] After Close\n2018-01-09 19:22:51,852 INFO [__main__] Start connection\n2018-01-09 19:22:51,853 INFO [__main__] Receive\n2018-01-09 19:22:56,860 INFO [__main__] Write\n2018-01-09 19:22:56,860 INFO [__main__] Close\n2018-01-09 19:22:56,861 INFO [__main__] After Close\n2018-01-09 19:22:56,862 INFO [__main__] Receive\n2018-01-09 19:23:01,869 INFO [__main__] Write\n2018-01-09 19:23:01,870 INFO [__main__] Close\n2018-01-09 19:23:01,870 INFO [__main__] After Close\n```\n\n```\n$ python3 test.py \n2018-01-09 19:22:46,844 INFO [__main__] 5.013042688369751\n2018-01-09 19:22:51,852 INFO [__main__] 10.021281003952026\n2018-01-09 19:22:56,861 INFO [__main__] 15.030425786972046\n2018-01-09 19:23:01,871 INFO [__main__] 20.040003776550293\n```\n\nuvloop\n\n```\n$ python3 main_builtin_uvloop.py \n2018-01-09 19:25:00,169 INFO [__main__] Start connection\n2018-01-09 19:25:00,169 INFO [__main__] Receive\n2018-01-09 19:25:05,175 INFO [__main__] Write\n2018-01-09 19:25:05,175 INFO [__main__] Close\n2018-01-09 19:25:05,176 INFO [__main__] After Close\n2018-01-09 19:25:05,176 INFO [__main__] Start connection\n2018-01-09 19:25:05,177 INFO [__main__] Start connection\n2018-01-09 19:25:05,178 INFO [__main__] Start connection\n2018-01-09 19:25:05,178 INFO [__main__] Receive\n2018-01-09 19:25:10,185 INFO [__main__] Write\n2018-01-09 19:25:10,185 INFO [__main__] Close\n2018-01-09 19:25:10,186 INFO [__main__] After Close\n2018-01-09 19:25:10,186 INFO [__main__] Receive\n2018-01-09 19:25:15,193 INFO [__main__] Write\n2018-01-09 19:25:15,193 INFO [__main__] Close\n2018-01-09 19:25:15,194 INFO [__main__] After Close\n2018-01-09 19:25:15,194 INFO [__main__] Receive\n2018-01-09 19:25:20,201 INFO [__main__] Write\n2018-01-09 19:25:20,202 INFO [__main__] Close\n2018-01-09 19:25:20,202 INFO [__main__] After Close\n```\n\n```\n$ python3 test.py \n2018-01-09 19:25:05,176 INFO [__main__] 5.0111987590789795\n2018-01-09 19:25:20,203 INFO [__main__] 20.038110494613647\n2018-01-09 19:25:20,204 INFO [__main__] 20.0389666557312\n2018-01-09 19:25:20,204 INFO [__main__] 20.039414167404175\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexxit%2Fpyasyncweb-tests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexxit%2Fpyasyncweb-tests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexxit%2Fpyasyncweb-tests/lists"}