{"id":19797356,"url":"https://github.com/laspavel/cpu_load","last_synced_at":"2025-06-15T19:04:55.348Z","repository":{"id":206161655,"uuid":"715957232","full_name":"laspavel/cpu_load","owner":"laspavel","description":null,"archived":false,"fork":false,"pushed_at":"2023-11-08T07:21:05.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-11T05:19:11.211Z","etag":null,"topics":["cpu-load","load-testing","python","python3"],"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/laspavel.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}},"created_at":"2023-11-08T07:15:56.000Z","updated_at":"2023-11-08T19:37:02.000Z","dependencies_parsed_at":"2023-11-08T10:36:06.498Z","dependency_job_id":null,"html_url":"https://github.com/laspavel/cpu_load","commit_stats":null,"previous_names":["laspavel/cpu_load"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laspavel%2Fcpu_load","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laspavel%2Fcpu_load/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laspavel%2Fcpu_load/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laspavel%2Fcpu_load/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/laspavel","download_url":"https://codeload.github.com/laspavel/cpu_load/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241139224,"owners_count":19916461,"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":["cpu-load","load-testing","python","python3"],"created_at":"2024-11-12T07:24:54.160Z","updated_at":"2025-06-15T19:04:55.337Z","avatar_url":"https://github.com/laspavel.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CPU Load Generator\n\n![Python](https://img.shields.io/badge/python-3.6+-blue.svg)\n![License](https://img.shields.io/badge/license-MIT-green)\n\nA cross-platform CPU load generator for benchmarking and testing  \nSupports configurable utilization, duration, and number of cores.\n\n## 📌 Features\n\n* Generate custom CPU load (1%–100%)\n* Control test duration (in seconds)\n* Load specific number of CPU cores\n* Clean interruption handling (Ctrl+C)\n\n## ⚙️ Requirements\n\n- Python 3.6 or newer\n- Linux, Windows\n\n## 🚀 Installation \u0026 Usage\n\n```bash\ngit clone https://github.com/laspavel/cpu_load.git\ncd cpu_load\nchmod +x cpu_load.py\n./cpu_load.py [-i INTERVAL] [-u UTILIZATION] [-c CPUS] [-v]\n```\n\nPython dependencies are only from the standard library, no installation of packages is required.\n\nParameters:\n\n| Parameters         | Description                                           |  Default             |\n| ------------------ | ----------------------------------------------------- |  --------------------|\n| -i, --interval     | Duration in seconds to run the test                   |  30                  |\n| -u, --utilization  | CPU load percentage per core                          |  50                  |\n| -c, --cpus         | Number of CPU cores to load  (max = physical cores)   |  all available cores |\n| -v, --version      | Show program version and exit\t                       |                      |\n\n## 🧩  Example Usage\n\n```bash\n./load_cpu.py -i 60 -u 90 -c 2   # Run for 60 seconds at 90% load on 2 CPU cores\n```\n\n## 🛠 Build Standalone Binary\n\n```bash\n./build.sh\n```\n\n## 🧪 Testing Locally\n\nIf you prefer to run the load script directly on your host system:​\n\n```bash\nchmod +x load_cpu.sh\n./load_cpu.py\n```\n\n⚠️ Make sure Python 3 is installed and executable is marked with `chmod +x`.\n\n## 📁 Project Structure\n```plaintext\ncpu_load/\n├── cron/                   # Example cron tasks for automated stress tests\n├── src/                    # Source code for load generation\n├── build.sh                # Script to build binary file\n├── Dockerfile.build        # Docker image for build binary file\n├── LICENSE                 # MIT License\n└── README.md               # Project documentation\n```\n\n## 📄 License\nMIT License.​\n\n## 🤝 Contributions\n\nSuggestions and improvements are welcome! Feel free to open an issue or submit a pull request.\n\n## 📬 Contact\n\nAuthor: [laspavel](https://github.com/laspavel)\n\nFeel free to reach out with questions or ideas.\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaspavel%2Fcpu_load","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaspavel%2Fcpu_load","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaspavel%2Fcpu_load/lists"}