[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-4720":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":23,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":31,"readmeContent":32,"aiSummary":33,"trendingCount":16,"starSnapshotCount":16,"syncStatus":34,"lastSyncTime":35,"discoverSource":36},4720,"vegeta","tsenart\u002Fvegeta","tsenart","HTTP load testing tool and library. It's over 9000!","http:\u002F\u002Fgodoc.org\u002Fgithub.com\u002Ftsenart\u002Fvegeta\u002Flib",null,"Go",25067,1420,303,93,0,1,9,44,5,44.46,"MIT License",false,"master",true,[27,28,29,30],"benchmarking","go","http","load-testing","2026-06-12 02:01:03","# Vegeta [![Build Status](https:\u002F\u002Fgithub.com\u002Ftsenart\u002Fvegeta\u002Fworkflows\u002FCI\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Ftsenart\u002Fvegeta\u002Factions) [![Go Report Card](https:\u002F\u002Fgoreportcard.com\u002Fbadge\u002Fgithub.com\u002Ftsenart\u002Fvegeta)](https:\u002F\u002Fgoreportcard.com\u002Freport\u002Fgithub.com\u002Ftsenart\u002Fvegeta) [![PkgGoDev](https:\u002F\u002Fpkg.go.dev\u002Fbadge\u002Fgithub.com\u002Ftsenart\u002Fvegeta\u002Fv12\u002Flib)](https:\u002F\u002Fpkg.go.dev\u002Fgithub.com\u002Ftsenart\u002Fvegeta\u002Fv12\u002Flib) [![Gitter](https:\u002F\u002Fbadges.gitter.im\u002FJoin%20Chat.svg)](https:\u002F\u002Fgitter.im\u002Ftsenart\u002Fvegeta?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![Donate](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fdonate-bitcoin-yellow.svg)](#donate)\n\nVegeta is a versatile HTTP load testing tool built out of a need to drill\nHTTP services with a constant request rate. [It's over 9000!](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FIt's_Over_9000)\n\n![Vegeta](assets\u002Fhero.png)\n\n## Features\n\n- Usable as a command line tool and a Go library.\n- CLI designed with UNIX composability in mind.\n- [Avoids](https:\u002F\u002Fgithub.com\u002Ftsenart\u002Fvegeta\u002Fpull\u002F92\u002Ffiles#r20198929) nasty [Coordinated Omission](http:\u002F\u002Fhighscalability.com\u002Fblog\u002F2015\u002F10\u002F5\u002Fyour-load-generator-is-probably-lying-to-you-take-the-red-pi.html).\n- Extensive reporting functionality.\n- Simple to use for [distributed load testing](https:\u002F\u002Fkubernetes.io\u002Fblog\u002F2015\u002F11\u002Fone-million-requests-per-second-dependable-and-dynamic-distributed-systems-at-scale\u002F).\n- Easy to install and run (static binary, package managers, etc).\n\n## Install\n\n### Pre-compiled executables\n\nGet them [here](http:\u002F\u002Fgithub.com\u002Ftsenart\u002Fvegeta\u002Freleases).\n\n### macOS\n\nYou can install Vegeta using the [Homebrew](https:\u002F\u002Fgithub.com\u002FHomebrew\u002Fhomebrew\u002F):\n\n```shell\n$ brew update && brew install vegeta\n```\n\nOr with [MacPorts](https:\u002F\u002Fwww.macports.org\u002F):\n\n```shell\n$ port install vegeta\n```\n\n### Arch Linux\n\n```shell\n$ pacman -S vegeta\n```\n\n### FreeBSD\n\nOn FreeBSD you can install Vegeta with the built in package manager because there is a [Vegeta Package](https:\u002F\u002Fwww.freshports.org\u002Fbenchmarks\u002Fvegeta) available.\n\n```shell\n$ pkg install vegeta\n```\n\n### Source\n\n```shell\ngit clone https:\u002F\u002Fgithub.com\u002Ftsenart\u002Fvegeta\ncd vegeta\nmake vegeta\nmv vegeta ~\u002Fbin # Or elsewhere, up to you.\n```\n\n## Versioning\n\nBoth the library and the CLI are versioned with [SemVer v2.0.0](https:\u002F\u002Fsemver.org\u002Fspec\u002Fv2.0.0.html).\n\nAfter [v8.0.0](https:\u002F\u002Fgithub.com\u002Ftsenart\u002Fvegeta\u002Ftree\u002Fv8.0.0), the two components\nare versioned separately to better isolate breaking changes to each.\n\nCLI releases are tagged with `cli\u002FvMAJOR.MINOR.PATCH` and published on the [GitHub releases page](https:\u002F\u002Fgithub.com\u002Ftsenart\u002Fvegeta\u002Freleases).\nAs for the library, new versions are tagged with both `lib\u002FvMAJOR.MINOR.PATCH` and `vMAJOR.MINOR.PATCH`.\nThe latter tag is required for compatibility with `go mod`.\n\n## Contributing\n\nSee [CONTRIBUTING.md](.github\u002FCONTRIBUTING.md).\n\n## Usage manual\n\n```console\nUsage: vegeta [global flags] \u003Ccommand> [command flags]\n\nglobal flags:\n  -cpus int\n    \tNumber of CPUs to use (default = number of cpus)\n  -profile string\n    \tEnable profiling of [cpu, heap]\n  -version\n    \tPrint version and exit\n\nattack command:\n  -body string\n    \tRequests body file\n  -cert string\n    \tTLS client PEM encoded certificate file\n  -chunked\n    \tSend body with chunked transfer encoding\n  -connect-to value\n    \tA mapping of (ip|host):port to use instead of a target URL's (ip|host):port. Can be repeated multiple times.\n    \tIdentical src:port with different dst:port will round-robin over the different dst:port pairs.\n    \tExample: google.com:80:localhost:6060\n  -connections int\n    \tMax open idle connections per target host (default 10000)\n  -dns-ttl value\n    \tCache DNS lookups for the given duration [-1 = disabled, 0 = forever] (default 0s)\n  -duration duration\n    \tDuration of the test [0 = forever]\n  -format string\n    \tTargets format [http, json] (default \"http\")\n  -h2c\n    \tSend HTTP\u002F2 requests without TLS encryption\n  -header value\n    \tRequest header\n  -http2\n    \tSend HTTP\u002F2 requests when supported by the server (default true)\n  -insecure\n    \tIgnore invalid server TLS certificates\n  -keepalive\n    \tUse persistent connections (default true)\n  -key string\n    \tTLS client PEM encoded private key file\n  -laddr value\n    \tLocal IP address (default 0.0.0.0)\n  -lazy\n    \tRead targets lazily\n  -max-body value\n    \tMaximum number of bytes to capture from response bodies. [-1 = no limit] (default -1)\n  -max-connections int\n    \tMax connections per target host\n  -max-workers uint\n    \tMaximum number of workers (default 18446744073709551615)\n  -name string\n    \tAttack name\n  -output string\n    \tOutput file (default \"stdout\")\n  -prometheus-addr string\n    \tPrometheus exporter listen address [empty = disabled]. Example: 0.0.0.0:8880\n  -proxy-header value\n    \tProxy CONNECT header\n  -rate value\n    \tNumber of requests per time unit [0 = infinity] (default 50\u002F1s)\n  -redirects int\n    \tNumber of redirects to follow. -1 will not follow but marks as success (default 10)\n  -resolvers value\n    \tList of addresses (ip:port) to use for DNS resolution. Disables use of local system DNS. (comma separated list)\n  -root-certs value\n    \tTLS root certificate files (comma separated list)\n  -session-tickets\n    \tEnable TLS session resumption using session tickets\n  -targets string\n    \tTargets file (default \"stdin\")\n  -timeout duration\n    \tRequests timeout (default 30s)\n  -unix-socket string\n    \tConnect over a unix socket. This overrides the host address in target URLs\n  -workers uint\n    \tInitial number of workers (default 10)\n\nencode command:\n  -output string\n    \tOutput file (default \"stdout\")\n  -to string\n    \tOutput encoding [csv, gob, json] (default \"json\")\n\nplot command:\n  -output string\n    \tOutput file (default \"stdout\")\n  -threshold int\n    \tThreshold of data points above which series are downsampled. (default 4000)\n  -title string\n    \tTitle and header of the resulting HTML page (default \"Vegeta Plot\")\n\nreport command:\n  -buckets string\n    \tHistogram buckets, e.g.: \"[0,1ms,10ms]\"\n  -every duration\n    \tReport interval\n  -output string\n    \tOutput file (default \"stdout\")\n  -type string\n    \tReport type to generate [text, json, hist[buckets], hdrplot] (default \"text\")\n\nexamples:\n  echo \"GET http:\u002F\u002Flocalhost\u002F\" | vegeta attack -duration=5s | tee results.bin | vegeta report\n  vegeta report -type=json results.bin > metrics.json\n  cat results.bin | vegeta plot > plot.html\n  cat results.bin | vegeta report -type=\"hist[0,100ms,200ms,300ms]\"\n```\n\n#### `-cpus`\n\nSpecifies the number of CPUs to be used internally.\nIt defaults to the amount of CPUs available in the system.\n\n#### `-profile`\n\nSpecifies which profiler to enable during execution. Both _cpu_ and\n_heap_ profiles are supported. It defaults to none.\n\n#### `-version`\n\nPrints the version and exits.\n\n### `attack` command\n\n#### `-body`\n\nSpecifies the file whose content will be set as the body of every\nrequest unless overridden per attack target, see `-targets`.\n\n#### `-cert`\n\nSpecifies the PEM encoded TLS client certificate file to be used with HTTPS requests.\nIf `-key` isn't specified, it will be set to the value of this flag.\n\n#### `-chunked`\n\nSpecifies whether to send request bodies with the chunked transfer encoding.\n\n#### `-connections`\n\nSpecifies the maximum number of idle open connections per target host.\n\n#### `-dns-ttl`\n\nSpecifies the duration to cache DNS lookups for. A zero value caches forever.\nA negative value disables caching altogether.\n\n#### `-max-connections`\n\nSpecifies the maximum number of connections per target host.\n\n#### `-duration`\n\nSpecifies the amount of time to issue request to the targets.\nThe internal concurrency structure's setup has this value as a variable.\nThe actual run time of the test can be longer than specified due to the\nresponses delay. Use 0 for an infinite attack.\n\n#### `-format`\n\nSpecifies the targets format to decode.\n\n##### `json` format\n\nThe JSON format makes integration with programs that produce targets dynamically easier.\nEach target is one JSON object in its own line. The method and url fields are required.\nIf present, the body field must be base64 encoded. The generated [JSON Schema](lib\u002Ftarget.schema.json)\ndefines the format in detail.\n\n```bash\njq -ncM '{method: \"GET\", url: \"http:\u002F\u002Fgoku\", body: \"Punch!\" | @base64, header: {\"Content-Type\": [\"text\u002Fplain\"]}}' |\n  vegeta attack -format=json -rate=100 | vegeta encode\n```\n\n##### `http` format\n\nThe http format almost resembles the plain-text HTTP message format defined in\n[RFC 2616](https:\u002F\u002Fwww.w3.org\u002FProtocols\u002Frfc2616\u002Frfc2616-sec5.html) but it\ndoesn't support in-line HTTP bodies, only references to files that are loaded and used\nas request bodies (as exemplified below).\n\nAlthough targets in this format can be produced by other programs, it was originally\nmeant to be used by people writing targets by hand for simple use cases.\n\nHere are a few examples of valid targets files in the http format:\n\n###### Simple targets\n\n```\nGET http:\u002F\u002Fgoku:9090\u002Fpath\u002Fto\u002Fdragon?item=ball\nGET http:\u002F\u002Fuser:password@goku:9090\u002Fpath\u002Fto\nHEAD http:\u002F\u002Fgoku:9090\u002Fpath\u002Fto\u002Fsuccess\n```\n\n###### Targets with custom headers\n\n```\nGET http:\u002F\u002Fuser:password@goku:9090\u002Fpath\u002Fto\nX-Account-ID: 8675309\n\nDELETE http:\u002F\u002Fgoku:9090\u002Fpath\u002Fto\u002Fremove\nConfirmation-Token: 90215\nAuthorization: Token DEADBEEF\n```\n\n###### Targets with custom bodies\n\n```\nPOST http:\u002F\u002Fgoku:9090\u002Fthings\n@\u002Fpath\u002Fto\u002Fnewthing.json\n\nPATCH http:\u002F\u002Fgoku:9090\u002Fthing\u002F71988591\n@\u002Fpath\u002Fto\u002Fthing-71988591.json\n```\n\n###### Targets with custom bodies and headers\n\n```\nPOST http:\u002F\u002Fgoku:9090\u002Fthings\nX-Account-ID: 99\n@\u002Fpath\u002Fto\u002Fnewthing.json\n```\n\n###### Add comments\n\nLines starting with `#` are ignored.\n\n```\n# get a dragon ball\nGET http:\u002F\u002Fgoku:9090\u002Fpath\u002Fto\u002Fdragon?item=ball\n# specify a test account\nX-Account-ID: 99\n```\n\n#### `-h2c`\n\nSpecifies that HTTP2 requests are to be sent over TCP without TLS encryption.\n\n#### `-header`\n\nSpecifies a request header to be used in all targets defined, see `-targets`.\nYou can specify as many as needed by repeating the flag.\n\n#### `-http2`\n\nSpecifies whether to enable HTTP\u002F2 requests to servers which support it.\n\n#### `-insecure`\n\nSpecifies whether to ignore invalid server TLS certificates.\n\n#### `-keepalive`\n\nSpecifies whether to reuse TCP connections between HTTP requests.\n\n#### `-key`\n\nSpecifies the PEM encoded TLS client certificate private key file to be\nused with HTTPS requests.\n\n#### `-laddr`\n\nSpecifies the local IP address to be used.\n\n#### `-lazy`\n\nSpecifies whether to read the input targets lazily instead of eagerly.\nThis allows streaming targets into the attack command and reduces memory\nfootprint.\nThe trade-off is one of added latency in each hit against the targets.\n\n#### `-max-body`\n\nSpecifies the maximum number of bytes to capture from the body of each\nresponse. Remaining unread bytes will be fully read but discarded.\nSet to -1 for no limit. It knows how to interpret values like these:\n\n- `\"10 MB\"` -> `10MB`\n- `\"10240 g\"` -> `10TB`\n- `\"2000\"` -> `2000B`\n- `\"1tB\"` -> `1TB`\n- `\"5 peta\"` -> `5PB`\n- `\"28 kilobytes\"` -> `28KB`\n- `\"1 gigabyte\"` -> `1GB`\n\n#### `-name`\n\nSpecifies the name of the attack to be recorded in responses.\n\n#### `-output`\n\nSpecifies the output file to which the binary results will be written\nto. Made to be piped to the report command input. Defaults to stdout.\n\n#### `-rate`\n\nSpecifies the request rate per time unit to issue against\nthe targets. The actual request rate can vary slightly due to things like\ngarbage collection, but overall it should stay very close to the specified.\nIf no time unit is provided, 1s is used.\n\nA `-rate` of `0` or `infinity` means vegeta will send requests as fast as possible.\nUse together with `-max-workers` to model a fixed set of concurrent users sending\nrequests serially (i.e. waiting for a response before sending the next request).\n\nSetting `-max-workers` to a very high number while setting `-rate=0` can result in\nvegeta consuming too many resources and crashing. Use with care.\n\n#### `-redirects`\n\nSpecifies the max number of redirects followed on each request. The\ndefault is 10. When the value is -1, redirects are not followed but\nthe response is marked as successful.\n\n#### `-resolvers`\n\nSpecifies custom DNS resolver addresses to use for name resolution instead of\nthe ones configured by the operating system. Works only on non Windows systems.\n\n#### `-root-certs`\n\nSpecifies the trusted TLS root CAs certificate files as a comma separated\nlist. If unspecified, the default system CAs certificates will be used.\n\n#### `-session-tickets`\n\nSpecifies whether to support TLS session resumption using session tickets.\n\n#### `-targets`\n\nSpecifies the file from which to read targets, defaulting to stdin.\nSee the [`-format`](#-format) section to learn about the different target formats.\n\n#### `-timeout`\n\nSpecifies the timeout for each request. A value of `0` disables timeouts.\n\n#### `-workers`\n\nSpecifies the initial number of workers used in the attack. The actual\nnumber of workers will increase if necessary in order to sustain the\nrequested rate, unless it'd go beyond `-max-workers`.\n\n#### `-max-workers`\n\nSpecifies the maximum number of workers used in the attack. It can be used to\ncontrol the concurrency level used by an attack.\n\n### `report` command\n\n```console\nUsage: vegeta report [options] [\u003Cfile>...]\n\nOutputs a report of attack results.\n\nArguments:\n  \u003Cfile>  A file with vegeta attack results encoded with one of\n          the supported encodings (gob | json | csv) [default: stdin]\n\nOptions:\n  --type    Which report type to generate (text | json | hist[buckets] | hdrplot).\n            [default: text]\n\n  --buckets Histogram buckets, e.g.: '[0,1ms,10ms]'\n\n  --every   Write the report to --output at every given interval (e.g 100ms)\n            The default of 0 means the report will only be written after\n            all results have been processed. [default: 0]\n\n  --output  Output file [default: stdout]\n\nExamples:\n  echo \"GET http:\u002F\u002F:80\" | vegeta attack -rate=10\u002Fs > results.gob\n  echo \"GET http:\u002F\u002F:80\" | vegeta attack -rate=100\u002Fs | vegeta encode > results.json\n  vegeta report results.*\n```\n\n#### `report -type=text`\n\n```console\nRequests      [total, rate, throughput] 1200, 120.00, 65.87\nDuration      [total, attack, wait]     10.094965987s, 9.949883921s, 145.082066ms\nLatencies     [min, mean, 50, 95, 99, max]  90.438129ms, 113.172398ms, 108.272568ms, 140.18235ms, 247.771566ms, 264.815246ms\nBytes In      [total, mean]             3714690, 3095.57\nBytes Out     [total, mean]             0, 0.00\nSuccess       [ratio]                   55.42%\nStatus Codes  [code:count]              0:535  200:665\nError Set:\nGet http:\u002F\u002Flocalhost:6060: dial tcp 127.0.0.1:6060: connection refused\nGet http:\u002F\u002Flocalhost:6060: read tcp 127.0.0.1:6060: connection reset by peer\nGet http:\u002F\u002Flocalhost:6060: dial tcp 127.0.0.1:6060: connection reset by peer\nGet http:\u002F\u002Flocalhost:6060: write tcp 127.0.0.1:6060: broken pipe\nGet http:\u002F\u002Flocalhost:6060: net\u002Fhttp: transport closed before response was received\nGet http:\u002F\u002Flocalhost:6060: http: can't write HTTP request on broken connection\n```\n\nThe `Requests` row shows:\n\n- The `total` number of issued requests.\n- The real request `rate` sustained during the `attack` period.\n- The `throughput` of successful requests over the `total` period.\n\nThe `Duration` row shows:\n\n- The `attack` time taken issuing all requests (`total` - `wait`)\n- The `wait` time waiting for the response to the last issued request (`total` - `attack`)\n- The `total` time taken in the attack (`attack` + `wait`)\n\nLatency is the amount of time taken for a response to a request to be read (including the `-max-body` bytes from the response body).\n\n- `min` is the minimum latency of all requests in an attack.\n- `mean` is the [arithmetic mean \u002F average](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FArithmetic_mean) of the latencies of all requests in an attack.\n- `50`, `90`, `95`, `99` are the 50th, 90th, 95th and 99th [percentiles](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FPercentile), respectively, of the latencies of all requests in an attack. To understand more about why these are useful, I recommend [this article](https:\u002F\u002Fbravenewgeek.com\u002Feverything-you-know-about-latency-is-wrong\u002F) from @tylertreat.\n- `max` is the maximum latency of all requests in an attack.\n\nThe `Bytes In` and `Bytes Out` rows shows:\n\n- The `total` number of bytes sent (out) or received (in) with the request or response bodies.\n- The `mean` number of bytes sent (out) or received (in) with the request or response bodies.\n\nThe `Success` ratio shows the percentage of requests whose responses didn't error and had status codes between **200** and **400** (non-inclusive).\n\nThe `Status Codes` row shows a histogram of status codes. `0` status codes mean a request failed to be sent.\n\nThe `Error Set` shows a unique set of errors returned by all issued requests. These include requests that got non-successful response status code.\n\n#### `report -type=json`\n\nAll duration like fields are in nanoseconds.\n\n```json\n{\n  \"latencies\": {\n    \"total\": 237119463,\n    \"mean\": 2371194,\n    \"50th\": 2854306,\n    \"90th\": 3228223,\n    \"95th\": 3478629,\n    \"99th\": 3530000,\n    \"max\": 3660505,\n    \"min\": 1949582\n  },\n  \"buckets\": {\n    \"0\": 9952,\n    \"1000000\": 40,\n    \"2000000\": 6,\n    \"3000000\": 0,\n    \"4000000\": 0,\n    \"5000000\": 2\n  },\n  \"bytes_in\": {\n    \"total\": 606700,\n    \"mean\": 6067\n  },\n  \"bytes_out\": {\n    \"total\": 0,\n    \"mean\": 0\n  },\n  \"earliest\": \"2015-09-19T14:45:50.645818631+02:00\",\n  \"latest\": \"2015-09-19T14:45:51.635818575+02:00\",\n  \"end\": \"2015-09-19T14:45:51.639325797+02:00\",\n  \"duration\": 989999944,\n  \"wait\": 3507222,\n  \"requests\": 100,\n  \"rate\": 101.01010672380401,\n  \"throughput\": 101.00012489812,\n  \"success\": 1,\n  \"status_codes\": {\n    \"200\": 100\n  },\n  \"errors\": []\n}\n```\n\nIn the `buckets` field, each key is a nanosecond value representing the lower bound of a bucket.\nThe upper bound is implied by the next higher bucket.\nUpper bounds are non-inclusive.\nThe highest bucket is the overflow bucket; it has no upper bound.\nThe values are counts of how many requests fell into that particular bucket.\nIf the `-buckets` parameter is not present, the `buckets` field is omitted.\n\n#### `report -type=hist`\n\nComputes and prints a text based histogram for the given buckets.\nEach bucket upper bound is non-inclusive.\n\n```console\ncat results.bin | vegeta report -type='hist[0,2ms,4ms,6ms]'\nBucket         #     %       Histogram\n[0,     2ms]   6007  32.65%  ########################\n[2ms,   4ms]   5505  29.92%  ######################\n[4ms,   6ms]   2117  11.51%  ########\n[6ms,   +Inf]  4771  25.93%  ###################\n```\n\n#### `report -type=hdrplot`\n\nWrites out results in a format plottable by https:\u002F\u002Fhdrhistogram.github.io\u002FHdrHistogram\u002FplotFiles.html.\n\n```\nValue(ms)  Percentile  TotalCount  1\u002F(1-Percentile)\n0.076715   0.000000    0           1.000000\n0.439370   0.100000    200         1.111111\n0.480836   0.200000    400         1.250000\n0.495559   0.300000    599         1.428571\n0.505101   0.400000    799         1.666667\n0.513059   0.500000    999         2.000000\n0.516664   0.550000    1099        2.222222\n0.520455   0.600000    1199        2.500000\n0.525008   0.650000    1299        2.857143\n0.530174   0.700000    1399        3.333333\n0.534891   0.750000    1499        4.000000\n0.537572   0.775000    1548        4.444444\n0.540340   0.800000    1598        5.000000\n0.543763   0.825000    1648        5.714286\n0.547164   0.850000    1698        6.666667\n0.551432   0.875000    1748        8.000000\n0.553444   0.887500    1773        8.888889\n0.555774   0.900000    1798        10.000000\n0.558454   0.912500    1823        11.428571\n0.562123   0.925000    1848        13.333333\n0.565563   0.937500    1873        16.000000\n0.567831   0.943750    1886        17.777778\n0.570617   0.950000    1898        20.000000\n0.574522   0.956250    1911        22.857143\n0.579046   0.962500    1923        26.666667\n0.584426   0.968750    1936        32.000000\n0.586695   0.971875    1942        35.555556\n0.590451   0.975000    1948        40.000000\n0.597543   0.978125    1954        45.714286\n0.605637   0.981250    1961        53.333333\n0.613564   0.984375    1967        64.000000\n0.620393   0.985938    1970        71.113640\n0.629121   0.987500    1973        80.000000\n0.638060   0.989062    1976        91.424392\n0.648085   0.990625    1979        106.666667\n0.659689   0.992188    1982        128.008193\n0.665870   0.992969    1984        142.227279\n0.672985   0.993750    1986        160.000000\n0.680101   0.994531    1987        182.848784\n0.687810   0.995313    1989        213.356091\n0.695729   0.996094    1990        256.016385\n0.730641   0.996484    1991        284.414107\n0.785516   0.996875    1992        320.000000\n0.840392   0.997266    1993        365.764448\n1.009646   0.997656    1993        426.621160\n1.347020   0.998047    1994        512.032770\n1.515276   0.998242    1994        568.828214\n1.683532   0.998437    1995        639.795266\n1.887487   0.998633    1995        731.528895\n2.106249   0.998828    1996        853.242321\n2.325011   0.999023    1996        1023.541453\n2.434952   0.999121    1996        1137.656428\n2.544894   0.999219    1996        1280.409731\n2.589510   0.999316    1997        1461.988304\n2.605192   0.999414    1997        1706.484642\n2.620873   0.999512    1997        2049.180328\n2.628713   0.999561    1997        2277.904328\n2.636394   0.999609    1997        2557.544757\n2.644234   0.999658    1997        2923.976608\n2.652075   0.999707    1997        3412.969283\n2.658916   0.999756    1998        4098.360656\n2.658916   0.999780    1998        4545.454545\n2.658916   0.999805    1998        5128.205128\n2.658916   0.999829    1998        5847.953216\n2.658916   0.999854    1998        6849.315068\n2.658916   0.999878    1998        8196.721311\n2.658916   0.999890    1998        9090.909091\n2.658916   0.999902    1998        10204.081633\n2.658916   0.999915    1998        11764.705882\n2.658916   0.999927    1998        13698.630137\n2.658916   0.999939    1998        16393.442623\n2.658916   0.999945    1998        18181.818182\n2.658916   0.999951    1998        20408.163265\n2.658916   0.999957    1998        23255.813953\n2.658916   0.999963    1998        27027.027027\n2.658916   0.999969    1998        32258.064516\n2.658916   0.999973    1998        37037.037037\n2.658916   0.999976    1998        41666.666667\n2.658916   0.999979    1998        47619.047619\n2.658916   0.999982    1998        55555.555556\n2.658916   0.999985    1998        66666.666667\n2.658916   0.999986    1998        71428.571429\n2.658916   0.999988    1998        83333.333333\n2.658916   0.999989    1998        90909.090909\n2.658916   0.999991    1998        111111.111111\n2.658916   0.999992    1998        125000.000000\n2.658916   0.999993    1998        142857.142858\n2.658916   0.999994    1998        166666.666668\n2.658916   0.999995    1998        199999.999999\n2.658916   0.999996    1998        250000.000000\n2.658916   0.999997    1998        333333.333336\n2.658916   0.999998    1998        500000.000013\n2.658916   0.999999    1998        999999.999971\n2.658916   1.000000    1998        10000000.000000\n```\n\n### `encode` command\n\n```\nUsage: vegeta encode [options] [\u003Cfile>...]\n\nEncodes vegeta attack results from one encoding to another.\nThe supported encodings are Gob (binary), CSV and JSON.\nEach input file may have a different encoding which is detected\nautomatically.\n\nThe CSV encoder doesn't write a header. The columns written by it are:\n\n  1. Unix timestamp in nanoseconds since epoch\n  2. HTTP status code\n  3. Request latency in nanoseconds\n  4. Bytes out\n  5. Bytes in\n  6. Error\n  7. Base64 encoded response body\n  8. Attack name\n  9. Sequence number of request\n  10. Method\n  11. URL\n  12. Base64 encoded response headers\n\nArguments:\n  \u003Cfile>  A file with vegeta attack results encoded with one of\n          the supported encodings (gob | json | csv) [default: stdin]\n\nOptions:\n  --to      Output encoding (gob | json | csv) [default: json]\n  --output  Output file [default: stdout]\n\nExamples:\n  echo \"GET http:\u002F\u002F:80\" | vegeta attack -rate=1\u002Fs > results.gob\n  cat results.gob | vegeta encode | jq -c 'del(.body)' | vegeta encode -to gob\n```\n\n### `plot` command\n\n![Plot](https:\u002F\u002Fi.imgur.com\u002FJra1sNH.png)\n\n```\nUsage: vegeta plot [options] [\u003Cfile>...]\n\nOutputs an HTML time series plot of request latencies over time.\nThe X axis represents elapsed time in seconds from the beginning\nof the earliest attack in all input files. The Y axis represents\nrequest latency in milliseconds.\n\nClick and drag to select a region to zoom into. Double click to zoom out.\nChoose a different number on the bottom left corner input field\nto change the moving average window size (in data points).\n\nArguments:\n  \u003Cfile>  A file output by running vegeta attack [default: stdin]\n\nOptions:\n  --title      Title and header of the resulting HTML page.\n               [default: Vegeta Plot]\n  --threshold  Threshold of data points to downsample series to.\n               Series with less than --threshold number of data\n               points are not downsampled. [default: 4000]\n\nExamples:\n  echo \"GET http:\u002F\u002F:80\" | vegeta attack -name=50qps -rate=50 -duration=5s > results.50qps.bin\n  cat results.50qps.bin | vegeta plot > plot.50qps.html\n  echo \"GET http:\u002F\u002F:80\" | vegeta attack -name=100qps -rate=100 -duration=5s > results.100qps.bin\n  vegeta plot results.50qps.bin results.100qps.bin > plot.html\n```\n\n## Usage: Generated targets\n\nApart from accepting a static list of targets, Vegeta can be used together with another program that generates them in a streaming fashion. Here's an example of that using the `jq` utility that generates targets with an incrementing id in their body.\n\n```console\njq -ncM 'while(true; .+1) | {method: \"POST\", url: \"http:\u002F\u002F:6060\", body: {id: .} | @base64 }' | \\\n  vegeta attack -rate=50\u002Fs -lazy -format=json -duration=30s | \\\n  tee results.bin | \\\n  vegeta report\n```\n\n## Usage: Distributed attacks\n\nWhenever your load test can't be conducted due to Vegeta hitting machine limits\nsuch as open files, memory, CPU or network bandwidth, it's a good idea to use Vegeta in a distributed manner.\n\nIn a hypothetical scenario where the desired attack rate is 60k requests per second,\nlet's assume we have 3 machines with `vegeta` installed.\n\nMake sure open file descriptor and process limits are set to a high number for your user **on each machine**\nusing the `ulimit` command.\n\nWe're ready to start the attack. All we need to do is to divide the intended rate by the number of machines,\nand use that number on each attack. Here we'll use [pdsh](https:\u002F\u002Fcode.google.com\u002Fp\u002Fpdsh\u002F) for orchestration.\n\n```shell\n$ PDSH_RCMD_TYPE=ssh pdsh -b -w '10.0.1.1,10.0.2.1,10.0.3.1' \\\n    'echo \"GET http:\u002F\u002Ftarget\u002F\" | vegeta attack -rate=20000 -duration=60s > result.bin'\n```\n\nAfter the previous command finishes, we can gather the result files to use on our report.\n\n```shell\n$ for machine in 10.0.1.1 10.0.2.1 10.0.3.1; do\n    scp $machine:~\u002Fresult.bin $machine.bin &\n  done\n```\n\nThe `report` command accepts multiple result files.\nIt'll read and sort them by timestamp before generating reports.\n\n```console\nvegeta report *.bin\n```\n\nAnother way to gather results in distributed tests is to use the built-in Prometheus Exporter and configure a Prometheus Server to get test results from all Vegeta instances. See `attack` option \"prometheus-addr\" for more details and a complete example in the section \"Prometheus Support\".\n\n## Usage: Real-time Analysis\n\nIf you are a happy user of iTerm, you can integrate vegeta with [jplot](https:\u002F\u002Fgithub.com\u002Frs\u002Fjplot) using [jaggr](https:\u002F\u002Fgithub.com\u002Frs\u002Fjaggr) to plot a vegeta report in real-time in the comfort of your terminal:\n\n```\necho 'GET http:\u002F\u002Flocalhost:8080' | \\\n    vegeta attack -rate 5000 -duration 10m | vegeta encode | \\\n    jaggr @count=rps \\\n          hist\\[100,200,300,400,500\\]:code \\\n          p25,p50,p95:latency \\\n          sum:bytes_in \\\n          sum:bytes_out | \\\n    jplot rps+code.hist.100+code.hist.200+code.hist.300+code.hist.400+code.hist.500 \\\n          latency.p95+latency.p50+latency.p25 \\\n          bytes_in.sum+bytes_out.sum\n```\n\n![](https:\u002F\u002Fi.imgur.com\u002FttBDsQS.gif)\n\n## Usage: Library\n\nThe library versioning follows [SemVer v2.0.0](https:\u002F\u002Fsemver.org\u002Fspec\u002Fv2.0.0.html).\nSince [lib\u002Fv9.0.0](https:\u002F\u002Fgithub.com\u002Ftsenart\u002Fvegeta\u002Ftree\u002Flib\u002Fv9.0.0), the library and cli\nare versioned separately to better isolate breaking changes to each component.\n\nSee [Versioning](#Versioning) for more details on git tag naming schemes and compatibility\nwith `go mod`.\n\n```go\npackage main\n\nimport (\n  \"fmt\"\n  \"time\"\n\n  vegeta \"github.com\u002Ftsenart\u002Fvegeta\u002Fv12\u002Flib\"\n)\n\nfunc main() {\n  rate := vegeta.Rate{Freq: 100, Per: time.Second}\n  duration := 4 * time.Second\n  targeter := vegeta.NewStaticTargeter(vegeta.Target{\n    Method: \"GET\",\n    URL:    \"http:\u002F\u002Flocalhost:9100\u002F\",\n  })\n  attacker := vegeta.NewAttacker()\n\n  var metrics vegeta.Metrics\n  for res := range attacker.Attack(targeter, rate, duration, \"Big Bang!\") {\n    metrics.Add(res)\n  }\n  metrics.Close()\n\n  fmt.Printf(\"99th percentile: %s\\n\", metrics.Latencies.P99)\n}\n```\n\n#### Limitations\n\nThere will be an upper bound of the supported `rate` which varies on the\nmachine being used.\nYou could be CPU bound (unlikely), memory bound (more likely) or\nhave system resource limits being reached which ought to be tuned for\nthe process execution. The important limits for us are file descriptors\nand processes. On a UNIX system you can get and set the current\nsoft-limit values for a user.\n\n```shell\n$ ulimit -n # file descriptors\n2560\n$ ulimit -u # processes \u002F threads\n709\n```\n\nJust pass a new number as the argument to change it.\n\n## Prometheus support\n\nVegeta has a built-in Prometheus Exporter that may be enabled during attacks so that you can point any Prometheus instance to Vegeta attack processes and monitor attack metrics.\n\nTo enable the Prometheus Exporter on the command line, set the \"prometheus-addr\" flag.\n\nA Prometheus HTTP endpoint will be available only during the lifespan of an attack and will be closed right after the attack is finished.\n\nThe following metrics are exposed:\n\n* `request_bytes_in` - bytes count received from targeted servers by \"url\", \"method\" and \"status\"\n* `request_bytes_out` - bytes count sent to targeted server by \"url\", \"method\" and \"status\"\n* `request_seconds` - histogram with request latency and counters by \"url\", \"method\" and \"status\"\n* `request_fail_count` - count of failed requests by \"url\", \"method\", \"status\" and \"message\"\n\n\u003Cimage src=\"lib\u002Fprom\u002Fprometheus-sample.png\" width=\"500\" \u002F>\n\nCheck file [lib\u002Fprom\u002Fgrafana.json](lib\u002Fprom\u002Fgrafana.json) with the source of this sample dashboard in Grafana.\n\n### Limitations\n\n1. Prometheus scrapes metrics from a running vegeta attack process and assigns timestamps to samples on its server. This means result timestamps aren't accurate (i.e. they're scraping time, not result time).\n2. Configuring Prometheus to scrape vegeta needs to happen out-of-band. That's a hassle!\n3. Since there's no coordination between a vegeta attack process and a Prometheus server, an attack process will finish before Prometheus has the chance to scrape the latest observations.\n\n\nWhy aren't we using pushgateway instead? See [this comment](https:\u002F\u002Fgithub.com\u002Ftsenart\u002Fvegeta\u002Fpull\u002F534#issuecomment-1629943731).\n\nThere's [an issue](https:\u002F\u002Fgithub.com\u002Ftsenart\u002Fvegeta\u002Fissues\u002F637) tracking the proper solution to all these limitations which is a remote write integration.\n\n## License\n\nSee [LICENSE](LICENSE).\n\n## Donate\n\nIf you use and love Vegeta, please consider sending some Satoshi to\n`1MDmKC51ve7Upxt75KoNM6x1qdXHFK6iW2`. In case you want to be mentioned as a\nsponsor, let me know!\n\n[![Donate Bitcoin](https:\u002F\u002Fi.imgur.com\u002FW9Vc51d.png)](#donate)\n","Vegeta 是一个HTTP负载测试工具和库，专为以恒定请求速率对HTTP服务进行压力测试而设计。它既可以用作命令行工具，也可以作为Go语言库集成到项目中，支持分布式负载测试，并且避免了协调遗漏问题，提供丰富的报告功能。其设计考虑了UNIX的组合性原则，易于安装和使用，支持多种操作系统如macOS、Linux及FreeBSD等。适用于需要评估Web应用性能极限或进行大规模并发访问模拟的场景。",2,"2026-06-11 03:00:17","top_language"]