Skip to content

Commit

Permalink
Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Brophy committed Nov 8, 2017
1 parent c234103 commit b71237b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
blast --rate=20000 --workers=1000 --worker-type="dummy" --worker-template='{"min":25,"max":50}'
```

Using the http worker to request www.google.com at 1 request per second (warning: this is making real http requests - don't turn the rate up!):
Using the http worker to request Google's homepage at one request per second (warning: this is making real http requests - don't turn the rate up!):
```
blast --rate=1 --worker-type="http" --payload-template='{"method":"GET","url":"http://www.google.com/"}'
```
Expand Down
2 changes: 1 addition & 1 deletion blaster/doc-gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ var doc = map[string]string{
"Summary": "",
"ThreadSafeBuffer": "",
"Worker": "Worker is an interface that allows blast to easily be extended to support any protocol. See `main.go` for an example of how to build a command with your custom worker type.",
"doc_go": "Package blaster provides the back-end for blast - a tool for load testing and sending api requests in bulk.\n\n Blast\n =====\n\n * Blast makes API requests at a fixed rate.\n * The number of concurrent workers is configurable.\n * The rate may be changed interactively during execution.\n * Blast is protocol agnostic, and adding a new worker type is trivial.\n * For load testing: random data can be added to API requests.\n * For batch jobs: CSV data can be loaded from local file or GCS bucket, and successful items from previous runs are skipped.\n\n Installation\n ============\n ## Mac\n ```\n brew tap dave/blast\n brew install blast\n ```\n\n ## Linux\n See the [releases page](https://github.com/dave/blast/releases)\n\n ## From source\n ```\n go get -u github.com/dave/blast\n ```\n\n Examples\n ========\n Using the dummy worker to send at 20,000 requests per second (the dummy worker returns after a random wait, and occasionally returns errors):\n ```\n blast --rate=20000 --workers=1000 --worker-type=\"dummy\" --worker-template='{\"min\":25,\"max\":50}'\n ```\n\n Using the http worker to request www.google.com at 1 request per second (warning: this is making real http requests - don't turn the rate up!):\n ```\n blast --rate=1 --worker-type=\"http\" --payload-template='{\"method\":\"GET\",\"url\":\"http://www.google.com/\"}'\n ```\n\n Status\n ======\n\n Blast prints a summary every ten seconds. While blast is running, you can hit enter for an updated\n summary, or enter a number to change the sending rate. Each time you change the rate a new column\n of metrics is created. If the worker returns a field named `status` in it's response, the values\n are summarised as rows.\n\n Here's an example of the output:\n\n ```\n Metrics\n =======\n Concurrency: 1999 / 2000 workers in use\n\n Desired rate: (all) 10000 1000 100\n Actual rate: 2112 5354 989 100\n Avg concurrency: 1733 1976 367 37\n Duration: 00:40 00:12 00:14 00:12\n\n Total\n -----\n Started: 84525 69004 14249 1272\n Finished: 82525 67004 14249 1272\n Mean: 376.0 ms 374.8 ms 379.3 ms 377.9 ms\n 95th: 491.1 ms 488.1 ms 488.2 ms 489.6 ms\n\n 200\n ---\n Count: 79208 (96%) 64320 (96%) 13663 (96%) 1225 (96%)\n Mean: 376.2 ms 381.9 ms 374.7 ms 378.1 ms\n 95th: 487.6 ms 489.0 ms 487.2 ms 490.5 ms\n\n 404\n ---\n Count: 2467 (3%) 2002 (3%) 430 (3%) 35 (3%)\n Mean: 371.4 ms 371.0 ms 377.2 ms 358.9 ms\n 95th: 487.1 ms 487.1 ms 486.0 ms 480.4 ms\n\n 500\n ---\n Count: 853 (1%) 685 (1%) 156 (1%) 12 (1%)\n Mean: 371.2 ms 370.4 ms 374.5 ms 374.3 ms\n 95th: 487.6 ms 487.1 ms 488.2 ms 466.3 ms\n\n Current rate is 10000 requests / second. Enter a new rate or press enter to view status.\n\n Rate?\n ```\n\n Config\n ======\n Blast is configured by config file, command line flags or environment variables. The `--config` flag specifies the config file to load, and can be `json`, `yaml`, `toml` or anything else that [viper](https://github.com/spf13/viper) can read. If the config flag is omitted, blast searches for `blast-config.xxx` in the current directory, `$HOME/.config/blast/` and `/etc/blast/`.\n\n Environment variables and command line flags override config file options. Environment variables are upper case and prefixed with \"BLAST\" e.g. `BLAST_PAYLOAD_TEMPLATE`.\n\n Templates\n =========\n The `payload-template` and `worker-template` options accept values that are rendered using the Go text/template system. Variables of the form `{{ .name }}` or `{{ \"name\" }}` are replaced with data.\n\n Additionally, several simple functions are available to inject random data which is useful in load testing scenarios:\n\n * `{{ rand_int -5 5 }}` - a random integer between -5 and 5.\n * `{{ rand_float -5 5 }}` - a random float between -5 and 5.\n * `{{ rand_string 10 }}` - a random string, length 10.",
"doc_go": "Package blaster provides the back-end for blast - a tool for load testing and sending api requests in bulk.\n\n Blast\n =====\n\n * Blast makes API requests at a fixed rate.\n * The number of concurrent workers is configurable.\n * The rate may be changed interactively during execution.\n * Blast is protocol agnostic, and adding a new worker type is trivial.\n * For load testing: random data can be added to API requests.\n * For batch jobs: CSV data can be loaded from local file or GCS bucket, and successful items from previous runs are skipped.\n\n Installation\n ============\n ## Mac\n ```\n brew tap dave/blast\n brew install blast\n ```\n\n ## Linux\n See the [releases page](https://github.com/dave/blast/releases)\n\n ## From source\n ```\n go get -u github.com/dave/blast\n ```\n\n Examples\n ========\n Using the dummy worker to send at 20,000 requests per second (the dummy worker returns after a random wait, and occasionally returns errors):\n ```\n blast --rate=20000 --workers=1000 --worker-type=\"dummy\" --worker-template='{\"min\":25,\"max\":50}'\n ```\n\n Using the http worker to request Google's homepage at one request per second (warning: this is making real http requests - don't turn the rate up!):\n ```\n blast --rate=1 --worker-type=\"http\" --payload-template='{\"method\":\"GET\",\"url\":\"http://www.google.com/\"}'\n ```\n\n Status\n ======\n\n Blast prints a summary every ten seconds. While blast is running, you can hit enter for an updated\n summary, or enter a number to change the sending rate. Each time you change the rate a new column\n of metrics is created. If the worker returns a field named `status` in it's response, the values\n are summarised as rows.\n\n Here's an example of the output:\n\n ```\n Metrics\n =======\n Concurrency: 1999 / 2000 workers in use\n\n Desired rate: (all) 10000 1000 100\n Actual rate: 2112 5354 989 100\n Avg concurrency: 1733 1976 367 37\n Duration: 00:40 00:12 00:14 00:12\n\n Total\n -----\n Started: 84525 69004 14249 1272\n Finished: 82525 67004 14249 1272\n Mean: 376.0 ms 374.8 ms 379.3 ms 377.9 ms\n 95th: 491.1 ms 488.1 ms 488.2 ms 489.6 ms\n\n 200\n ---\n Count: 79208 (96%) 64320 (96%) 13663 (96%) 1225 (96%)\n Mean: 376.2 ms 381.9 ms 374.7 ms 378.1 ms\n 95th: 487.6 ms 489.0 ms 487.2 ms 490.5 ms\n\n 404\n ---\n Count: 2467 (3%) 2002 (3%) 430 (3%) 35 (3%)\n Mean: 371.4 ms 371.0 ms 377.2 ms 358.9 ms\n 95th: 487.1 ms 487.1 ms 486.0 ms 480.4 ms\n\n 500\n ---\n Count: 853 (1%) 685 (1%) 156 (1%) 12 (1%)\n Mean: 371.2 ms 370.4 ms 374.5 ms 374.3 ms\n 95th: 487.6 ms 487.1 ms 488.2 ms 466.3 ms\n\n Current rate is 10000 requests / second. Enter a new rate or press enter to view status.\n\n Rate?\n ```\n\n Config\n ======\n Blast is configured by config file, command line flags or environment variables. The `--config` flag specifies the config file to load, and can be `json`, `yaml`, `toml` or anything else that [viper](https://github.com/spf13/viper) can read. If the config flag is omitted, blast searches for `blast-config.xxx` in the current directory, `$HOME/.config/blast/` and `/etc/blast/`.\n\n Environment variables and command line flags override config file options. Environment variables are upper case and prefixed with \"BLAST\" e.g. `BLAST_PAYLOAD_TEMPLATE`.\n\n Templates\n =========\n The `payload-template` and `worker-template` options accept values that are rendered using the Go text/template system. Variables of the form `{{ .name }}` or `{{ \"name\" }}` are replaced with data.\n\n Additionally, several simple functions are available to inject random data which is useful in load testing scenarios:\n\n * `{{ rand_int -5 5 }}` - a random integer between -5 and 5.\n * `{{ rand_float -5 5 }}` - a random float between -5 and 5.\n * `{{ rand_string 10 }}` - a random string, length 10.",
"logRecord": "",
"mapR": "",
"metricsDef": "",
Expand Down
2 changes: 1 addition & 1 deletion blaster/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Package blaster provides the back-end for blast - a tool for load testing and se
blast --rate=20000 --workers=1000 --worker-type="dummy" --worker-template='{"min":25,"max":50}'
```
Using the http worker to request www.google.com at 1 request per second (warning: this is making real http requests - don't turn the rate up!):
Using the http worker to request Google's homepage at one request per second (warning: this is making real http requests - don't turn the rate up!):
```
blast --rate=1 --worker-type="http" --payload-template='{"method":"GET","url":"http://www.google.com/"}'
```
Expand Down

0 comments on commit b71237b

Please sign in to comment.