{"id":23130049,"url":"https://github.com/ts-azure-services/stress-testing-oai-endpoints","last_synced_at":"2025-04-04T06:41:22.334Z","repository":{"id":265855276,"uuid":"893275226","full_name":"ts-azure-services/stress-testing-oai-endpoints","owner":"ts-azure-services","description":"A repo to test scaling OAI endpoints","archived":false,"fork":false,"pushed_at":"2024-12-03T17:28:25.000Z","size":25,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-09T17:46:13.781Z","etag":null,"topics":["apim","azure-openai","bash","bicep","load-balancing"],"latest_commit_sha":null,"homepage":"","language":"Bicep","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ts-azure-services.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-11-24T01:47:37.000Z","updated_at":"2025-02-05T07:26:39.000Z","dependencies_parsed_at":"2024-12-01T08:35:47.903Z","dependency_job_id":"6c3e4a3b-b055-46d6-8e38-48a5a117a5ba","html_url":"https://github.com/ts-azure-services/stress-testing-oai-endpoints","commit_stats":null,"previous_names":["ts-azure-services/stress-testing-oai-endpoints"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ts-azure-services%2Fstress-testing-oai-endpoints","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ts-azure-services%2Fstress-testing-oai-endpoints/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ts-azure-services%2Fstress-testing-oai-endpoints/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ts-azure-services%2Fstress-testing-oai-endpoints/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ts-azure-services","download_url":"https://codeload.github.com/ts-azure-services/stress-testing-oai-endpoints/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247135125,"owners_count":20889420,"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":["apim","azure-openai","bash","bicep","load-balancing"],"created_at":"2024-12-17T10:12:11.298Z","updated_at":"2025-04-04T06:41:22.313Z","avatar_url":"https://github.com/ts-azure-services.png","language":"Bicep","funding_links":[],"categories":[],"sub_categories":[],"readme":"This repo contains a number of workflows and scripts to stress test Azure OpenAI endpoints, both individually and through an APIM\ninstance. Most of the workflow and steps are captured in the `Makefile` and should be followed sequentially. This leverages\n`locust` as a testing framework to simulate concurrent users, but also leverages batch approaches to hit the endpoints with load.\nAll this was tested on a Mac, though would work equally on any Unix-based machine. This also relies on several command-line tools like\n`parallel`, `jq`, `grep` and `time`. For reference, most of these tools are available natively in the Azure Cloud shell providing an easy\ndeployment option (except for the `time` utility).\n\n### Random Notes\n- For the Azure OpenAI endpoints, this has leveraged the Global Standard deployment for gpt-4o-mini. This can be customized as needed.\n- This does not include setup of Application Insights or Log Analytics as part of the workflow.\n- For most of the \"batch\" workflows, there is no logic to implement a backoff period. Limits should be understood considering the\n  capacity of the endpoint and/or the logic in place (e.g. with APIM) to handle throttling.\n- While on a Mac, to monitor CPU and memory usage, consider using `btop` (available through Homebrew). To determine the number of CPUs, run: `sysctl -n hw.ncpu`.\n- Future build:\n  - Inclusion of text embedding endpoints to test Azure Search workflows.\n\n### References\n- For the APIM tooling, leveraged this great [repo](https://github.com/Azure-Samples/AI-Gateway) to support setup and the custom APIM policy.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fts-azure-services%2Fstress-testing-oai-endpoints","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fts-azure-services%2Fstress-testing-oai-endpoints","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fts-azure-services%2Fstress-testing-oai-endpoints/lists"}