{"id":19069338,"url":"https://github.com/milonoir/schwer","last_synced_at":"2026-06-21T17:31:48.628Z","repository":{"id":83054158,"uuid":"193466998","full_name":"milonoir/schwer","owner":"milonoir","description":"A single binary application with built-in web front-end that can produce cpu/mem load.","archived":false,"fork":false,"pushed_at":"2019-08-03T07:31:54.000Z","size":298,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-03-18T14:13:50.527Z","etag":null,"topics":["cpu-load","cpu-monitoring","memory-load","memory-monitoring","testing-tool"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/milonoir.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":"2019-06-24T08:38:33.000Z","updated_at":"2024-06-19T06:27:27.120Z","dependencies_parsed_at":null,"dependency_job_id":"2eb9084b-3bcc-467d-97f9-938ca705b5a5","html_url":"https://github.com/milonoir/schwer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/milonoir/schwer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milonoir%2Fschwer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milonoir%2Fschwer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milonoir%2Fschwer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milonoir%2Fschwer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/milonoir","download_url":"https://codeload.github.com/milonoir/schwer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milonoir%2Fschwer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34620358,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-21T02:00:05.568Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","cpu-monitoring","memory-load","memory-monitoring","testing-tool"],"created_at":"2024-11-09T01:13:59.887Z","updated_at":"2026-06-21T17:31:48.614Z","avatar_url":"https://github.com/milonoir.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Schwer\n\n_German_ | _adjective_ | /ʃveːɐ/ | _meaning_: heavy\n\nA single binary application with built-in web front-end that can produce cpu/mem load.\n\n\n## Installation\n\n1. Clone this repo\n2. Change working directory to your local cloned repo\n3. `$ go generate . \u0026\u0026 go build .`\n\n\n## Usage\n\nOnce you built the application, just run it. Schwer, by default, binds to port `9999`, but you\ncan specify a different port (between 1024-65535) if you like by using the `-port` flag:\n\n`$ ./schwer -port 19999`\n\n\n### Web\n\nWhile Schwer is running, you can open the web front-end in your browser by visiting `localhost:\u003cport\u003e`.\n\nYou should see something like this:\n\n![Schwer index page](img/schwer_index.png)\n\nThe amount of CPU load percentage Schwer can produce can be specified by typing a number between\n0 - 100 into the little input field and hitting enter or clicking the `[Update]` button.\n\nThe size of extra memory to be allocated (on top of the memory consumption of Schwer itself) can be\nset by typing a positive integer (in MB) into the little input field and hitting enter or clicking\nthe `[Update]` button.\n\n\n### API\n\nYou can also use Schwer via its HTTP API.\n\n| Endpoint | Method | Params | Response code |  Description |\n| -------- | ------ | ------ | ------------- |  ----------- |\n| `/cpu`   | `GET`  | `-`    | 200 OK        | Returns an array of CPU utilisation levels per core (e.g. `[49, 34, 50, 32]` in case of a machine with 4 cores). |\n| `/cpu`   | `POST` | `pct` - load level % (0-100) | 202 Accepted\u003cbr\u003e400 Bad Request | Sets the load level for Schwer to produce. |\n| `/mem`   | `GET`  | `-`    | 200 OK        | Returns a JSON object of memory stats in MB (e.g. `{\"total\": 16384, \"available\": 5413, \"used\": 10966, \"usedpct\": 67}`). |\n| `/mem`   | `POST` | `size` - memory allocation size in MB | 202 Accepted\u003cbr\u003e400 Bad Request | Schwer allocates this amount of extra memory. |\n\n\n## Limitations\n\nUnder the hood Schwer spins up a goroutine for each CPU core in order to make them busy. However,\ndue to the nature of the Go runtime and scheduler, a goroutine cannot tell which CPU core it is\nrunning on. Hence, Schwer cannot control the load of a specific CPU core (i.e. one cannot set 70%\nload for CPU core #1 and 15% load for CPU core #2, etc.). For this reason Schwer tries to load all\nCPU cores equally.\n\n\n## TODO\n\n- [x] CPU load monitor\n- [x] Memory load monitor\n- [ ] Make it work on Windows\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilonoir%2Fschwer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmilonoir%2Fschwer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilonoir%2Fschwer/lists"}