https://github.com/hseera/dynamic-workload-model
Code to generate dynamic workload model. Useful for testing autoscaling in cloud or mimicking different load profile for different scenario.
https://github.com/hseera/dynamic-workload-model
cosine performance-testing python workload-graph
Last synced: 6 months ago
JSON representation
Code to generate dynamic workload model. Useful for testing autoscaling in cloud or mimicking different load profile for different scenario.
- Host: GitHub
- URL: https://github.com/hseera/dynamic-workload-model
- Owner: hseera
- License: mit
- Created: 2020-10-18T04:51:08.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-09-16T09:24:18.000Z (over 3 years ago)
- Last Synced: 2024-08-03T17:10:11.095Z (9 months ago)
- Topics: cosine, performance-testing, python, workload-graph
- Language: Python
- Homepage:
- Size: 54.7 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-python-testing - Dynamic Workload Model - Code to generate dynamic workload model. Useful for testing autoscaling in cloud or mimicking different load profile for different scenario. (Load Testing)
README
# Dynamic Workload Model
 [](LICENSE)[](https://github.com/hseera/dynamic-workload-model/commits/) [](https://github.com/hseera/dynamic-workload-model/)
[](https://github.com/hseera/dynamic-workload-model/issues/new/choose)
[](https://github.com/hseera/dynamic-workload-model/issues?q=is%3Aopen+is%3Aissue)
[](https://github.com/hseera/dynamic-workload-model/issues?q=is%3Aclosed+is%3Aissue)There are times when you want to generate dynamic workload model to test different scenarios. For example testing autoscaling in cloud.
In 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.
## Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
### Prerequisites
What things you need to execute the script
* python >=3.5
### Execution
Before 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.
Play around with the function values to get the correct workload model you want to emulate for your testing.
### Output
Following are same of the workload model examples that you can generate based on cosine parameter values.**Scenario 1:**
With following Cosine function values, you will get the following workload graph
```
duration = 3600
y1Amplitude = 25
y2Amplitude = 25
y1NoofCycles = 12
y2NoofCycles = 4
y1HorizontalShift = 0
y2HorizontalShift = 0
y1VerticalShift = 25
y2VerticalShift = 25
```
**Scenario 2:**
With following Cosine function values, you will get the following workload graph
```
duration = 3600
y1Amplitude = 25
y2Amplitude = 25
y1NoofCycles = 4
y2NoofCycles = 8
y1HorizontalShift = 0
y2HorizontalShift = 0
y1VerticalShift = 25
y2VerticalShift = 25
```
**Scenario 3:**
With following Cosine function values, you will get the following workload graph
```
duration = 3600
y1Amplitude = 25
y2Amplitude = 25
y1NoofCycles = 4
y2NoofCycles = 10
y1HorizontalShift = 0
y2HorizontalShift = 0
y1VerticalShift = 25
y2VerticalShift = 25
```
**Scenario 4:**
With following Cosine function values, you will get the following workload graph
```
duration = 3600
y1Amplitude = 25
y2Amplitude = 25
y1NoofCycles = 4
y2NoofCycles = 5
y1HorizontalShift = 0
y2HorizontalShift = 0
y1VerticalShift = 25
y2VerticalShift = 25
```
## Contribute
If you would like to contribute to this project, please reachout to me. Issues and pull requests are welcomed too.
## Author
[](https://github.com/hseera/) [
](https://www.linkedin.com/in/hpseera) [
](https://twitter.com/@HarinderSeera)
[](https://github.com/hseera?tab=followers)
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details