{"id":13771831,"url":"https://github.com/hseera/dynamic-workload-model","last_synced_at":"2025-05-11T04:30:56.486Z","repository":{"id":109766633,"uuid":"305024729","full_name":"hseera/dynamic-workload-model","owner":"hseera","description":"Code to generate dynamic workload model. Useful for testing autoscaling in cloud or mimicking different load profile for different scenario.","archived":false,"fork":false,"pushed_at":"2021-09-16T09:24:18.000Z","size":56,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-11-17T07:34:30.583Z","etag":null,"topics":["cosine","performance-testing","python","workload-graph"],"latest_commit_sha":null,"homepage":"","language":"Python","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/hseera.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}},"created_at":"2020-10-18T04:51:08.000Z","updated_at":"2023-01-02T06:30:22.000Z","dependencies_parsed_at":"2023-06-11T17:45:39.964Z","dependency_job_id":null,"html_url":"https://github.com/hseera/dynamic-workload-model","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/hseera%2Fdynamic-workload-model","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hseera%2Fdynamic-workload-model/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hseera%2Fdynamic-workload-model/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hseera%2Fdynamic-workload-model/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hseera","download_url":"https://codeload.github.com/hseera/dynamic-workload-model/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253518941,"owners_count":21921074,"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":["cosine","performance-testing","python","workload-graph"],"created_at":"2024-08-03T17:00:56.068Z","updated_at":"2025-05-11T04:30:55.526Z","avatar_url":"https://github.com/hseera.png","language":"Python","readme":"# Dynamic Workload Model\n![Language Python](https://img.shields.io/badge/%20Language-python-blue.svg) [![MIT License](http://img.shields.io/badge/License-MIT-blue.png)](LICENSE)\n\n[![GitHub Last Commits](https://img.shields.io/github/last-commit/hseera/dynamic-workload-model.svg)](https://github.com/hseera/dynamic-workload-model/commits/) [![GitHub Size](https://img.shields.io/github/repo-size/hseera/dynamic-workload-model.svg)](https://github.com/hseera/dynamic-workload-model/)\n[![Open GitHub Issue](https://img.shields.io/badge/Open-Incident-brightgreen.svg)](https://github.com/hseera/dynamic-workload-model/issues/new/choose)\n[![GitHub Open Issues](https://img.shields.io/github/issues/hseera/dynamic-workload-model?color=purple)](https://github.com/hseera/dynamic-workload-model/issues?q=is%3Aopen+is%3Aissue)\n[![GitHub Closed Issues](https://img.shields.io/github/issues-closed/hseera/dynamic-workload-model?color=purple)](https://github.com/hseera/dynamic-workload-model/issues?q=is%3Aclosed+is%3Aissue)\n\nThere are times when you want to generate dynamic workload model to test different scenarios. For example testing autoscaling in cloud. \n\nIn your load test tool call the python code to get the load to generate value per second. Based on the value received then make appropriate # of requests per second.\n\n## Getting Started\n\nThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes.\n\n### Prerequisites\n\nWhat things you need to execute the script\n\n* python \u003e=3.5\n\n\n### Execution\n\nBefore running your test, you will need to invoke this function to generate the load profile profile which you can then feed in your test run.\n\nPlay around with the function values to get the correct workload model you want to emulate for your testing.\n\n### Output\nFollowing are same of the workload model examples that you can generate based on cosine parameter values.\n\n**Scenario 1:**\n\nWith following Cosine function values, you will get the following workload graph\n```\nduration = 3600\ny1Amplitude = 25\ny2Amplitude = 25\ny1NoofCycles = 12\ny2NoofCycles = 4\ny1HorizontalShift = 0\ny2HorizontalShift = 0\ny1VerticalShift = 25\ny2VerticalShift = 25\n```\n![Alt text](/images/Image1.png?raw=true \"Optional Title\")\n\n\n**Scenario 2:**\n\nWith following Cosine function values, you will get the following workload graph\n```\nduration = 3600\ny1Amplitude = 25\ny2Amplitude = 25\ny1NoofCycles = 4\ny2NoofCycles = 8\ny1HorizontalShift = 0\ny2HorizontalShift = 0\ny1VerticalShift = 25\ny2VerticalShift = 25\n```\n![Alt text](/images/Image2.png?raw=true \"Optional Title\")\n\n**Scenario 3:**\n\nWith following Cosine function values, you will get the following workload graph\n```\nduration = 3600\ny1Amplitude = 25\ny2Amplitude = 25\ny1NoofCycles = 4\ny2NoofCycles = 10\ny1HorizontalShift = 0\ny2HorizontalShift = 0\ny1VerticalShift = 25\ny2VerticalShift = 25\n```\n![Alt text](/images/Image3.png?raw=true \"Optional Title\")\n\n**Scenario 4:**\n\nWith following Cosine function values, you will get the following workload graph\n```\nduration = 3600\ny1Amplitude = 25\ny2Amplitude = 25\ny1NoofCycles = 4\ny2NoofCycles = 5\ny1HorizontalShift = 0\ny2HorizontalShift = 0\ny1VerticalShift = 25\ny2VerticalShift = 25\n```\n![Alt text](/images/Image4.png?raw=true \"Optional Title\")\n\n## Contribute\n\nIf you would like to contribute to this project, please reachout to me. Issues and pull requests are welcomed too.\n\n## Author\n[\u003cimg id=\"github\" src=\"./images/github.png\" width=\"50\" a=\"https://github.com/hseera/\"\u003e](https://github.com/hseera/)    [\u003cimg src=\"./images/linkedin.png\" style=\"max-width:100%;\" \u003e](https://www.linkedin.com/in/hpseera) [\u003cimg id=\"twitter\" src=\"./images/twitter.png\" width=\"50\" a=\"twitter.com/HarinderSeera/\"\u003e](https://twitter.com/@HarinderSeera) \u003ca href=\"https://twitter.com/intent/follow?screen_name=harinderseera\"\u003e \u003cimg src=\"https://img.shields.io/twitter/follow/harinderseera.svg?label=Follow%20@harinderseera\" alt=\"Follow @harinderseera\" /\u003e \u003c/a\u003e          [![GitHub followers](https://img.shields.io/github/followers/hseera.svg?style=social\u0026label=Follow\u0026maxAge=2592000)](https://github.com/hseera?tab=followers)\n\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details\n","funding_links":[],"categories":["Load Testing"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhseera%2Fdynamic-workload-model","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhseera%2Fdynamic-workload-model","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhseera%2Fdynamic-workload-model/lists"}