{"id":21291413,"url":"https://github.com/aatarasoff/apistress","last_synced_at":"2026-03-09T03:34:34.669Z","repository":{"id":141733525,"uuid":"65973557","full_name":"aatarasoff/apistress","owner":"aatarasoff","description":"Very simple stress testing tool for API","archived":false,"fork":false,"pushed_at":"2017-07-26T12:05:23.000Z","size":11,"stargazers_count":22,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-29T04:29:04.475Z","etag":null,"topics":["docker","load-testing","performance","stress-testing","test","vegeta"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/aatarasoff.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":"2016-08-18T07:03:35.000Z","updated_at":"2025-05-02T00:46:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"b2de1aa0-6b81-4a28-9951-7c3dd2d35f8b","html_url":"https://github.com/aatarasoff/apistress","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aatarasoff/apistress","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aatarasoff%2Fapistress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aatarasoff%2Fapistress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aatarasoff%2Fapistress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aatarasoff%2Fapistress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aatarasoff","download_url":"https://codeload.github.com/aatarasoff/apistress/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aatarasoff%2Fapistress/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30281550,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T02:57:19.223Z","status":"ssl_error","status_checked_at":"2026-03-09T02:56:26.373Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["docker","load-testing","performance","stress-testing","test","vegeta"],"created_at":"2024-11-21T13:22:41.589Z","updated_at":"2026-03-09T03:34:29.652Z","avatar_url":"https://github.com/aatarasoff.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# apistress\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/aatarasoff/apistress)](https://goreportcard.com/report/github.com/aatarasoff/apistress)\n\nThis is very simple stress testing tool for API based on [vegeta](https://github.com/tsenart/vegeta)\n\n## Motivation\n\nSometimes you want to check SLA of your API automatically. There are many tools for profiling or stressing your software, but all of them have the enormous complexity or analyze results by third party tools. This project helps you do it easy and in a straightforward way. One configuration file with a simple structure is needed. In configuration file you need to declare the target, attack time, request frequency and (this is the most important part) SLA for target service (99th latency percentile and percentage of successful requests). And if any test is failed, the program will print report and exit with error code. It gives simple integration with different continuous delivery tools.\n\n## Usage\n\nCreate file with name `config.json` and folowing structure:\n```Go\n{\n  \"baseUrl\": \"http://localhost:8080\",               //base url for targets\n  \"tests\": [                                        //array of tests\n    {\n      \"rps\": 100,                                   //target request per second\n      \"duration\": 1,                                //test duration\n      \"target\": {\n        \"method\": \"POST\",                           //http method for target url\n        \"path\": \"/test\",                            //relative path\n        \"headers\": [                                //optional\n          {\n            \"name\": \"X-Request-Id\",                 //http header name\n            \"value\": \"12345\"                        //http header value\n          }\n        ],\n        \"body\": \"ewoic2F5IiA6ICJoZWxsbyIKfQ==\"      //base64 endoded request body (optional)\n      },\n      \"sla\": {\n        \"latency\": 150,                             //99 percenitle latency\n        \"successRate\": 99.9                         //percentage of successful requests (2xx http code is returned)\n      }\n    }\n  ]\n}\n```\nThen run docker container:\n```bash\ndocker run --rm --net=host \\\n   -v /path/to/folder/with/config:/data \\\n   aatarasoff/apistress\n```\nor with overriden `baseUrl` config property:\n```bash\ndocker run --rm --net=host \\\n   -v /path/to/folder/with/config:/data \\\n   aatarasoff/apistress apistress \\\n   -baseUrl http://custom.server:8080\n```\nIf `stdin` input is required, use `-config=stdin` flag:\n```bash\ncat config.json | docker run --rm --net=host \\\n   aatarasoff/apistress apistress \\\n   -config=stdin\n```\nAlso it is possible to define own config file name and path:\n```bash\ndocker run --rm --net=host \\\n   -v /path/to/folder/with/config:/data \\\n   aatarasoff/apistress apistress \\\n   -config=/path/to/folder/with/config/filename.json\n```\nFor each test program prints metrics into `stdout`:\n```bash\nRequests      [total, rate]            10, 11.11\nDuration      [total, attack, wait]    1.007898226s, 899.953255ms, 107.944971ms\nLatencies     [mean, 50, 95, 99, max]  108.246432ms, 107.608893ms, 109.534083ms, 109.534083ms, 112.276495ms\nBytes In      [total, mean]            5750, 575.00\nBytes Out     [total, mean]            0, 0.00\nSuccess       [ratio]                  100.00%\nStatus Codes  [code:count]             200:10\nError Set:\n```\nand returns exit code that you may check with following command:\n```bash\necho $?       //0 - ok, 1 - sla error\n```\n\n## Usage without Docker or developing\n\nYou need install and setup `golang` 1.6 or above with following [instructions](https://golang.org/doc/install). Then run:\n```Go\ngo get\ngo install github.com/aatarasoff/apistress\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faatarasoff%2Fapistress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faatarasoff%2Fapistress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faatarasoff%2Fapistress/lists"}