{"id":15069353,"url":"https://github.com/jonatan-ivanov/resourceater","last_synced_at":"2025-04-10T17:35:34.708Z","repository":{"id":50631251,"uuid":"179780173","full_name":"jonatan-ivanov/resourceater","owner":"jonatan-ivanov","description":"Eats all of your resources :)","archived":false,"fork":false,"pushed_at":"2025-02-12T00:43:34.000Z","size":684,"stargazers_count":21,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-04T13:08:45.856Z","etag":null,"topics":["gradle","hacktoberfest","java","jdk","jre","jvm","monitoring","observability","spring","spring-boot"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonatan-ivanov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-04-06T02:33:13.000Z","updated_at":"2025-02-12T00:43:37.000Z","dependencies_parsed_at":"2024-02-09T02:22:22.109Z","dependency_job_id":"c2bfdc64-b5b5-4b9e-9d30-24f6736be5f5","html_url":"https://github.com/jonatan-ivanov/resourceater","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/jonatan-ivanov%2Fresourceater","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonatan-ivanov%2Fresourceater/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonatan-ivanov%2Fresourceater/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonatan-ivanov%2Fresourceater/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonatan-ivanov","download_url":"https://codeload.github.com/jonatan-ivanov/resourceater/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248262029,"owners_count":21074230,"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":["gradle","hacktoberfest","java","jdk","jre","jvm","monitoring","observability","spring","spring-boot"],"created_at":"2024-09-25T01:41:59.079Z","updated_at":"2025-04-10T17:35:34.690Z","avatar_url":"https://github.com/jonatan-ivanov.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://github.com/jonatan-ivanov/resourceater/actions/workflows/gradle.yml/badge.svg)](https://github.com/jonatan-ivanov/resourceater/actions)\n\n# resourceater\n\nResourceater is a Java based web service which consumes your resources on demand. It can be useful to simulate high resource needs. It can consume the following resources:\n\n- Heap by creating byte arrays (this also simulates memory leaks)\n- Off-Heap by allocating direct byte buffers\n- CPU by spinning up threads which can make the cores busy\n- Disk by creating big files\n- Threads by creating simple daemon threads which are doing nothing\n- Servlet Container Threads by calling itself and blocking the Container's (Tomcat) thread\n- Classes by generating new classes and loading them on-the-fly\n- Network by downloading large files over HTTP\n- Sockets by creating server sockets\n\n# Endpoints\nCheck [ReDoc](https://jonatan-ivanov.github.io/resourceater/) or the [Swagger-UI](http://localhost:8080/swagger-ui/index.html)\n\n# Examples\n\n## Heap\n\n```sh\ncurl -s -X POST \"http://localhost:8080/resources/objects\" -H \"Content-Type: application/json\" -d \"{ \\\"size\\\": \\\"1MB\\\"}\"\n```\n\n## Off-Heap\n\n```sh\ncurl -s -X POST \"http://localhost:8080/resources/directBuffers\" -H \"Content-Type: application/json\" -d \"{ \\\"size\\\": \\\"1MB\\\"}\"\n```\n\n## CPU\n\n```sh\ncurl -s -X POST \"http://localhost:8080/resources/cores\" -H \"Content-Type: application/json\" -d \"{ \\\"size\\\": 1}\"\n```\n\n## Disk\n\n```sh\ncurl -s -X POST \"http://localhost:8080/resources/files\" -H \"Content-Type: application/json\" -d \"{ \\\"size\\\": \\\"1MB\\\"}\"\n```\n\n## Threads\n\n```sh\ncurl -s -X POST \"http://localhost:8080/resources/threadPools\" -H \"Content-Type: application/json\" -d \"{ \\\"size\\\": 1}\"\n```\n\n## Container Threads\n\n```sh\ncurl -s -X POST \"http://localhost:8080/resources/containerThreads\" -H \"Content-Type: application/json\" -d \"{ \\\"size\\\": 1}\"\n```\n\n## Classes\n\n```sh\ncurl -s -X POST \"http://localhost:8080/resources/classPools\" -H \"Content-Type: application/json\" -d \"{ \\\"size\\\": 1}\"\n```\n\n## Network\n\n```sh\ncurl -s -X POST \"http://localhost:8080/resources/httpClients\"\n```\n\n## Sockets\n\n```sh\ncurl -s -X POST \"http://localhost:8080/resources/socketPools\" -H \"Content-Type: application/json\" -d \"{ \\\"size\\\": 1}\"\n```\n\n# Monitoring\n\nThe project is using [micrometer](https://micrometer.io/) and it also opens JMX on port `8686`; they give you a lot of information about what is going on under the hood, e.g.:\n\n- Metrics endpoint: [/actuator/metrics](http://localhost:8080/actuator/metrics)\n- Heap usage: [/actuator/metrics/jvm.memory.used?tag=area:heap](http://localhost:8080/actuator/metrics/jvm.memory.used?tag=area:heap)\n- Direct byte buffers (Off Heap): [/actuator/metrics/jvm.buffer.memory.used?tag=id:direct](http://localhost:8080/actuator/metrics/jvm.buffer.memory.used?tag=id:direct)\n- CPU usage: [/actuator/metrics/process.cpu.usage](http://localhost:8080/actuator/metrics/process.cpu.usage)\n- Number of CPU cores: [/actuator/metrics/system.cpu.count](http://localhost:8080/actuator/metrics/system.cpu.count)\n\n\n- Daemon thread count: [/actuator/metrics/jvm.threads.daemon](http://localhost:8080/actuator/metrics/jvm.threads.daemon)\n- Loaded Classes: [/actuator/metrics/jvm.classes.loaded](http://localhost:8080/actuator/metrics/jvm.classes.loaded)\n- Container (Tomcat) Threads: [/actuator/metrics/tomcat.threads.current](http://localhost:8080/actuator/metrics/tomcat.threads.current)\n\n# Docker\n\n```bash\ndocker run -it -p 8080:8080 -p 8686:8686 -v logs:/app/logs jonatanivanov/resourceater:tag\n```\n\n# Kubernetes\n\nYou need a cluster first, e.g.: `kind create cluster`\n\n```bash\nskaffold dev --port-forward\n```\nor\n```bash\nskaffold run --port-forward\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonatan-ivanov%2Fresourceater","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonatan-ivanov%2Fresourceater","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonatan-ivanov%2Fresourceater/lists"}