{"id":15478515,"url":"https://github.com/tomoyane/http-continuous-benchmarking","last_synced_at":"2025-07-11T17:44:51.219Z","repository":{"id":43728355,"uuid":"336801193","full_name":"tomoyane/http-continuous-benchmarking","owner":"tomoyane","description":"HTTP(S) Continuous Benchmarking tool for RESTful API. Useful for lightweight, continuous and simple measurement","archived":false,"fork":false,"pushed_at":"2023-04-20T12:21:17.000Z","size":68,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-19T03:24:15.944Z","etag":null,"topics":["benchmark","benchmarking","cicd","continuous-benchmarking","github-actions","go","monitoring","oss","performance-monitoring"],"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/tomoyane.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":"2021-02-07T14:03:48.000Z","updated_at":"2024-02-04T07:43:31.000Z","dependencies_parsed_at":"2022-08-22T13:01:03.082Z","dependency_job_id":"7c9d3630-b1f4-4f6e-9663-35e1640c0ff7","html_url":"https://github.com/tomoyane/http-continuous-benchmarking","commit_stats":{"total_commits":65,"total_committers":2,"mean_commits":32.5,"dds":0.01538461538461533,"last_synced_commit":"e0b79d9c766e800fa153b653c31b081456b40769"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomoyane%2Fhttp-continuous-benchmarking","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomoyane%2Fhttp-continuous-benchmarking/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomoyane%2Fhttp-continuous-benchmarking/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomoyane%2Fhttp-continuous-benchmarking/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomoyane","download_url":"https://codeload.github.com/tomoyane/http-continuous-benchmarking/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248223827,"owners_count":21068069,"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":["benchmark","benchmarking","cicd","continuous-benchmarking","github-actions","go","monitoring","oss","performance-monitoring"],"created_at":"2024-10-02T04:05:21.014Z","updated_at":"2025-04-10T13:05:18.297Z","avatar_url":"https://github.com/tomoyane.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## HTTP Continuous benchmarking\n\nThis repository provides a continuous benchmarking.  \nIf your project needs benchmark monitoring, it collects performance data by this repository.\n\n|Type|Badge/URL|\n|---|---|\n|CI|[![ci](https://github.com/tomoyane/http-continuous-benchmarking/actions/workflows/ci.yml/badge.svg)](https://github.com/tomoyane/http-continuous-benchmarking/actions/workflows/ci.yml)|\n|Release|[![release](https://github.com/tomoyane/http-continuous-benchmarking/actions/workflows/release.yml/badge.svg)](https://github.com/tomoyane/http-continuous-benchmarking/actions/workflows/release.yml)|\n|Go Report Card|[![Go Report Card](https://goreportcard.com/badge/github.com/tomoyane/http-continuous-benchmarking)](https://goreportcard.com/report/github.com/tomoyane/http-continuous-benchmarking)|\n|Coveralls|[![Coverage Status](https://coveralls.io/repos/github/tomoyane/http-continuous-benchmarking/badge.svg?branch=main)](https://coveralls.io/github/tomoyane/http-continuous-benchmarking?branch=main)|\n|Coverage report for GitHub Pages|[Coverage report GitHub Pages](https://tomoyane.github.io/http-continuous-benchmarking/#file0)\n|Docker Registry|[http-continuous-benchmarking](https://hub.docker.com/r/tomohito/http-continuous-benckmarking)|\n\n### Concept\n* Simple and lightweight benchmark tool\n  * This tool is not recommended for if large-scale performance measurements\n* Continuous benchmarking tool\n  * Always monitor performance impacts for source code changes\n* Lightweight to make various requests\n  * The user does not do complicated things\n* Create measured reports and notify warnings\n  * Create a continuous report and associate it with a commit hash\n  * Warn and notice when the threshold is reached\n\n### How to use GitHub Actions\nWith input variable.  \n**(※)** is required.\n\n|With input name|Description|Example|\n|---|---|---|\n|target_url **(※)**|Request destination URL.|http(s)://xxxxxxx.com/api/v1/users|\n|http_headers **(※)**|Request HTTP Headers. Json `{}` format.|{\"Authorization\": \"Bearer xxx\", \"Content-Type\": \"application/json\"}|\n|thread_num **(※)**|Client thread num.|5|\n|trial_num **(※)**|Benchmark trial number while 5seconds. If its 5times, the benchmark try 5times * 5seconds.|5 \u003cbr\u003e(Ex: Case of API 100rps, 100(rps) * 5(seconds) * 5(times))|\n|req_http_method_ratio **(※)**|HTTP method percentage of request. Json `{}` format.|{\"POST\": 4, \"GET\": 6}|\n|req_body|HTTP Request Body. If you use PUT or PATCH or POST, its required. Json `{}` format.|{\"email\": \"xx@gmail.com\"}|\n|enable_alert|Alert. You want to catch alert when over threshold.|true or false|\n|slack_web_hook_url|Slack web hook url. You can get [here](https://moff-bear.slack.com/apps/new/A0F7XDUAZ--incoming-webhook-)|https://hooks.slack.com/services/XXXXXXX/XXXXXXX/XXXXXXXXXXXXXX|\n|slack_channel|Slack channel.|test-01|\n|slack_notify_threshold_latency_millis|Threshold latency milliseconds for notification. This is to check latency average.|100|\n|slack_notify_threshold_rps|Threshold request per seconds for notification. |20|\n\nSample GitHub actions workflow yaml.\n```yaml\non: [push]\n\njobs:\n  benchmarking:\n    runs-on: ubuntu-latest\n    name: Attack\n    steps:\n      - name: Benchmarking\n        id: benchmarking\n        uses: tomoyane/http-continuous-benchmarking@1.1.0\n        with:\n          target_url: 'https://example.com'\n          http_headers: '{\"Content-Type\":\"application/json\"}'\n          thread_num: '1'\n          trial_num: '1'\n          req_http_method_ratio: '{\"GET\": 10}'\n      - name: Completed\n        run: echo \"Completed benchmarking\"\n```\n\nWith Slack notification workflow yaml.\n```yaml\non: [push]\n\njobs:\n  benchmarking:\n    runs-on: ubuntu-latest\n    name: Attack\n    steps:\n      - name: Benchmarking\n        id: benchmarking\n        uses: tomoyane/http-continuous-benchmarking@1.1.0\n        with:\n          target_url: 'https://example.com'\n          http_headers: '{\"Content-Type\":\"application/json\"}'\n          thread_num: '1'\n          trial_num: '1'\n          req_http_method_ratio: '{\"GET\": 10}'\n          enable_alert: 'true'\n          slack_web_hook_url: 'https://hooks.slack.com/services/XXXXXXX/XXXXXXX/XXXXXXXXXXXXXX'\n          slack_channel: 'test-01'\n          slack_notify_threshold_latency_millis: 20\n      - name: Completed\n        run: echo \"Completed benchmarking\"\n```\n\nIf result is over threshold, you will catch bellow message.\n\n![slack_msg_sample](https://user-images.githubusercontent.com/9509132/147807558-91190c09-a2d8-45cc-b63a-66b0dbd7b131.png)\n\n### How to use simple application\n[This repository application usage](https://github.com/tomoyane/http-continuous-benchmarking)\n\nApplication basic usage.\n```bash\n# Set required environment variable before execution\n$ git clone https://github.com/tomoyane/http-continuous-benchmarking.git\n$ cd http-continuous-benchmarking; go build\n$ export INPUT_TARGET_URL='https://example.com' \\\n         INPUT_REQ_HTTP_METHOD_RATIO='{\"GET\":10}' \\\n         INPUT_HTTP_HEADERS='{\"Content-Type\":\"application/json\"}' \\\n         INPUT_THREAD_NUM=2 \\\n         INPUT_TRIAL_NUM=2\n$ ./http-continuous-benchmarking\n\n## With Alert to Slack\n$ export INPUT_TARGET_URL='https://example.com' \\\n         INPUT_REQ_HTTP_METHOD_RATIO='{\"GET\":10}' \\\n         INPUT_HTTP_HEADERS='{\"Content-Type\":\"application/json\"}' \\\n         INPUT_THREAD_NUM=2 \\\n         INPUT_TRIAL_NUM=2 \\\n         INPUT_ENABLE_ALERT=true \\\n         INPUT_SLACK_WEB_HOOK_URL=\"https://hooks.slack.com/services/XXXXXXX/XXXXXXX/XXXXXXXXXXXXXX\" \\\n         INPUT_SLACK_CHANNEL=\"test-01\" \\\n         INPUT_SLACK_NOTIFY_THRESHOLD_LATENCY_MILLIS=100 # Case of latency\n$ ./http-continuous-benchmarking\n```\n\nDocker image usage.\n```bash\n$ docker pull tomohito/http-continuous-benckmarking\n$ docker run \\\n  --env INPUT_TARGET_URL='https://example.com' \\\n  --env INPUT_REQ_HTTP_METHOD_RATIO='{\"GET\":10}' \\\n  --env INPUT_HTTP_HEADERS='{\"Content-Type\":\"application/json\"}' \\\n  --env INPUT_THREAD_NUM=2 \\\n  --env INPUT_TRIAL_NUM=2 \\\n  -i tomohito/http-continuous-benckmarking\n```\n\n### Example benchmark result\n#### Metrics report HTML\n![Screen Shot 2021-02-28 at 11 16 19](https://user-images.githubusercontent.com/9509132/109417530-656e0180-7a07-11eb-922a-e6915d194eb8.png)\n\n#### Log\n```bash\n$ ./http-continuous-benchmarking\nHTTP request pattern according to the ratio = GET GET GET GET GET GET GET GET GET GET\nStart warnmup for duration 5 seconds\nEnd warmup\n\nStart time = 1614653873\n(Thread-3): Start attack for duration 5 seconds\n(Thread-1): Start attack for duration 5 seconds\n(Thread-2): Start attack for duration 5 seconds\n(Thread-1): End attack\n(Thread-2): End attack\n(Thread-3): End attack\n\nGET request stats information\nLatency 99  percentile: 190 milliseconds\nLatency 95  percentile: 172 milliseconds\nLatency avg percentile: 115 milliseconds\nLatency max percentile: 210 milliseconds\nLatency min percentile: 72 milliseconds\nRequest per seconds:    30\n\n(Thread-1): Start attack for duration 5 seconds\n(Thread-3): Start attack for duration 5 seconds\n(Thread-2): Start attack for duration 5 seconds\n(Thread-1): End attack\n(Thread-2): End attack\n(Thread-3): End attack\n\nGET request stats information\nLatency 99  percentile: 153 milliseconds\nLatency 95  percentile: 129 milliseconds\nLatency avg percentile: 94 milliseconds\nLatency max percentile: 192 milliseconds\nLatency min percentile: 65 milliseconds\nRequest per seconds:    36\n\nEnd time = 1614653894\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomoyane%2Fhttp-continuous-benchmarking","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomoyane%2Fhttp-continuous-benchmarking","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomoyane%2Fhttp-continuous-benchmarking/lists"}