{"id":23031565,"url":"https://github.com/jaredgorski/nodehog","last_synced_at":"2025-10-24T11:06:08.166Z","repository":{"id":65463334,"uuid":"186713198","full_name":"jaredgorski/nodehog","owner":"jaredgorski","description":"🐗 A simple cpu hog utility.","archived":false,"fork":false,"pushed_at":"2020-02-26T01:48:42.000Z","size":697,"stargazers_count":12,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-12T15:48:13.003Z","etag":null,"topics":["autoscaling","cpu-hog","horizontal-pod-autoscaler","kubernetes","stress","stress-testing"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/nodehog","language":"JavaScript","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/jaredgorski.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}},"created_at":"2019-05-14T23:06:03.000Z","updated_at":"2022-04-04T23:59:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"0cb813ad-42dd-4b8e-8356-039d88132071","html_url":"https://github.com/jaredgorski/nodehog","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jaredgorski/nodehog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredgorski%2Fnodehog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredgorski%2Fnodehog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredgorski%2Fnodehog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredgorski%2Fnodehog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaredgorski","download_url":"https://codeload.github.com/jaredgorski/nodehog/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredgorski%2Fnodehog/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269908569,"owners_count":24494579,"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","status":"online","status_checked_at":"2025-08-11T02:00:10.019Z","response_time":75,"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":["autoscaling","cpu-hog","horizontal-pod-autoscaler","kubernetes","stress","stress-testing"],"created_at":"2024-12-15T15:39:03.926Z","updated_at":"2025-10-24T11:06:03.145Z","avatar_url":"https://github.com/jaredgorski.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NodeHog \u003cimg align=\"left\" height=\"100\" src=\"https://raw.githubusercontent.com/jaredgorski/nodehog/master/.media/nodehog.png\"\u003e\nA simple resource hog utility.\n\n![](https://raw.githubusercontent.com/jaredgorski/nodehog/master/.media/nodehog_example.png)\n\n## Installation\n#### Local use\n```shell\nnpm i -g nodehog\n```\n#### Project use\n```shell\nnpm i nodehog\n```\n\n## Usage\nThis program can be used to create scheduled stress tests on a given target. Use cases include testing program performance under max CPU or Memory load, testing recovery from max load, and testing virtual autoscaling features such as the Kubernetes horizontal pod autoscaler.\n\n### Parameters\n- **Type:** The type of resource to stress _(memory | cpu)_\n- **Lifespan:** The length of the stress period in milliseconds\n- **Deathspan:** The length of the relief period in milliseconds\n- **Iterations:** The number of cycles to complete before NodeHog exits _(1 cycle = 1 lifespan + 1 deathspan)_\n\n#### CLI\n```console\n$ nodehog cpu 30000 30000 3\n\n╔═════════════════════════════════════════════════/\n║  nodehog     cpu      30000     30000     3\n╚═══════════════════════════════════════════════/\n     |          |         |         |       |\n     |          |         |         |       |\n  command       |         |         |       |\n               type       |         |       |\n                     lifespan(ms)   |       |\n                             deathspan(ms)  |\n                                        iterations\n```\n#### Programmatically\n```js\nconst NodeHog = require('nodehog');\n\nnew NodeHog('memory', 30000, 15000, 10).start();\n```\n\n---\n\nIf you find this useful, leave a star! If it can be improved in any way for your use case, fork it, send a PR, or just let me know 😃\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredgorski%2Fnodehog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaredgorski%2Fnodehog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredgorski%2Fnodehog/lists"}