We're going to go through all of the benchmark options to understand all possibilities.
This is a basic benchmark with 2 requests, run 4 plans concurrently against
http://example.com servers, executed 5 times. 40 requests in total.
---
concurrency: 4
base: 'http://example.com'
iterations: 5
rampup: 5
plan:
- name: Fetch users
request:
url: /api/users.json
- name: Fetch organizations
request:
url: /api/organizationsbase: Base url for all relative URL's in your plan. (Optional)iterations: Number of loops is going to do (Optional, default: 1)concurrency: Number of concurrent iterations. (Optional, default: max)rampup: Amount of time it will take to start all iterations. (Optional)plan: List of items to do in your benchmark. (Required)
include: Include all requests in the given file.request: Execute a HTTP request.assign: Assign a value in the context to be interpolated later.
All those three items can be combined with name property to be show in logs.
url: Url to be request for this itemheaders: List of custom headers you want to add in the requests.method: HTTP method in the requests. Valid methods are GET, POST, PUT, PATCH, HEAD or DELETE. (default: GET)body: Request body for methods like POST, PUT or PATCH.with_items: List of items to be interpolated in the given request url.with_items_range: Generates items from an iterator from start, step, stop.with_items_from_csv: Read the given CSV values and go through all of them as items.assign: save the response in the context to be interpolated later.
This item can be specified one of two ways. First, as a simple string specifying the csv file name.
Second, it can be a hash with the following properties:
file_name: csv file containing the records to be used as itemsquote_char: character to use as quote in csv parsing. Defaults to"\"", but can be set to"\'". If your csv file has quoted strings that contain commas and that causes parse errors, make sure this value is set correctly.