{"id":43293244,"url":"https://github.com/vanhtuan0409/trunks","last_synced_at":"2026-02-01T18:35:39.344Z","repository":{"id":57654692,"uuid":"195749123","full_name":"vanhtuan0409/trunks","owner":"vanhtuan0409","description":"Lightweight, template-based load testing tool built upon Vegeta","archived":false,"fork":false,"pushed_at":"2019-07-08T09:51:34.000Z","size":207,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-06-20T14:25:22.248Z","etag":null,"topics":["benchmarking","go","http","load-testing","sprig","vegeta"],"latest_commit_sha":null,"homepage":"","language":"Go","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/vanhtuan0409.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}},"created_at":"2019-07-08T06:21:22.000Z","updated_at":"2024-03-25T13:55:00.000Z","dependencies_parsed_at":"2022-09-01T01:41:24.557Z","dependency_job_id":null,"html_url":"https://github.com/vanhtuan0409/trunks","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/vanhtuan0409/trunks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanhtuan0409%2Ftrunks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanhtuan0409%2Ftrunks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanhtuan0409%2Ftrunks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanhtuan0409%2Ftrunks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vanhtuan0409","download_url":"https://codeload.github.com/vanhtuan0409/trunks/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanhtuan0409%2Ftrunks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28985818,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T18:17:03.387Z","status":"ssl_error","status_checked_at":"2026-02-01T18:16:57.287Z","response_time":56,"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":["benchmarking","go","http","load-testing","sprig","vegeta"],"created_at":"2026-02-01T18:35:38.773Z","updated_at":"2026-02-01T18:35:39.338Z","avatar_url":"https://github.com/vanhtuan0409.png","language":"Go","funding_links":["https://www.buymeacoffee.com/sHZbgvYh0"],"categories":[],"sub_categories":[],"readme":"# Trunks\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./resources/trunks.png\"\n\u003c/p\u003e\n\nTrunks is a lightweight, template-based load testing tool built upon [vegeta](https://github.com/tsenart/vegeta). Trunks combined the power of Vegeta and Golang Template to generate randomized data, mimics the pattern of real-life traffic.\n\nIf you like my work, consider buy me a coffee :D\n\n\u003ca href=\"https://www.buymeacoffee.com/sHZbgvYh0\" target=\"_blank\"\u003e\u003cimg src=\"https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png\" alt=\"Buy Me A Coffee\" style=\"height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;\" \u003e\u003c/a\u003e\n\n### Installation\n\n#### Pre-built binary\n\nPlease checkout [Release page](https://github.com/vanhtuan0409/trunks/releases)\n\n#### Source\n\nYou need `go` installed and `GOBIN` in your `PATH`. Once that is done, run the command:\n\n```shell\n$ go get -u github.com/vanhtuan0409/trunks\n```\n\n### Example\n\n```shell\n$ trunks -rate 10 -duration 20 -target targets.sample.yml | vegeta report\n```\n\n### Usage manual\n\n```console\nUsage of trunks:\n  -debug string\n        Write debug log to file (default discard)\n  -duration int\n        Duration to run the request (in seconds)\n  -output string\n        Output file (default \"stdout\")\n  -rate int\n        Request per second to send (default 5)\n  -target string\n        Targets config file path (default \"targets.yml\")\n```\n\n#### `-debug`\n\nSpecifies the path of debug log file. It defauls to be discarded (`/dev/null`)\n\n#### `-duration`\n\nSpecifies the amount of time to issue request to the targets. The internal concurrency structure's setup has this value as a variable. The actual run time of the test can be longer than specified due to the responses delay. Use 0 for an infinite attack.\n\n#### `-output`\n\nSpecifies the output file to which the binary results will be written to. Made to be piped to the report command input. Defaults to stdout.\n\nFor more details about load test analytics, please refer to [vegeta attack](https://github.com/tsenart/vegeta#report-command)\n\n#### `-rate`\n\nSpecifies the request rate per time unit to issue against the targets. The actual request rate can vary slightly due to things like garbage collection, but overall it should stay very close to the specified. If no time unit is provided, 1s is used.\n\n#### `-target`\n\nSpecifies the file config for targets. Refer to [Targets format](#targets-format)\n\n### Targets format\n\n```\nmeta:\n  headers:\n    Accept: application/json\ntargets:\n  - url: \"http://localhost:8080/api1?lat={{ randNumeric 3 }}\u0026long={{ randNumeric 3 }}\"\n    method: GET\n    repeat: 2\n    headers:\n      Authorization: \"Bearer xxx\"\n  - url: \"http://localhost:8080/api2?token={{ randAlphaNum 12 }}\"\n    method: POST\n    repeat: 3\n    body: |\n      {\n        \"timestamp\": {{ now | unixEpoch }},\n      }\n```\n\nGo template functions are powered by [Sprig](http://masterminds.github.io/sprig/)\n\n#### `meta.headers`\n\nSpecifies common Header for all targets. Not allow templating\n\n#### `targets[].url`\n\nSpecifies target URL for load test request. Allow templating\n\n#### `targets[].method`\n\nSpecifies HTTP Method for load test request.\n\n#### `targets[].body`\n\nSpecifies HTTP Body for load test request. Allow templating and only taken into affect when Method is not `GET`\n\n#### `targets[].headers`\n\nRequest-specific headers, will override [`meta.headers`](#metaheaders) if duplicated.\n\n#### `targets[].repeat`\n\nNumber of repeated time for a request (default to 1). Used for balancing request distribution among apis\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvanhtuan0409%2Ftrunks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvanhtuan0409%2Ftrunks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvanhtuan0409%2Ftrunks/lists"}