forked from dotnet/crank
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbombardier.yml
41 lines (40 loc) · 2.57 KB
/
bombardier.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
variables:
headers:
none: ''
plaintext: '--header "Accept: text/plain,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7" --header "Connection: keep-alive"'
html: '--header "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" --header "Connection: keep-alive"'
json: '--header "Accept: application/json,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7" --header "Connection: keep-alive"'
connectionclose: '--header "Connection: close"'
presetHeaders: none
jobs:
bombardier:
source:
repository: https://github.com/dotnet/crank.git
branchOrCommit: main
project: src/Microsoft.Crank.Jobs.Bombardier/Microsoft.Crank.Jobs.Bombardier.csproj
sourceKey: bombardier
noBuild: true
readyStateText: Bombardier Client
waitForExit: true
variables:
connections: 256
warmup: 15
duration: 15
requests: 0
timeout: 2
rate: 0
transport: fasthttp # | http1 | http2
serverScheme: http
serverAddress: localhost
serverPort: 5000
path:
body: # request body
bodyFile: # path or url for a file to use as the body content
certFile: # path or url for a file to use as the cert content
keyFile: # path or url for a file to use as the key content
stream: # specify whether to stream body
verb: # GET when nothing is specified
customHeaders: [ ] # list of headers with the format: '<name1>: <value1>', e.g. [ 'content-type: application/json' ]
arguments: "-c {{connections}} -w {{warmup}} -d {{duration}} -n {{requests}} -t {{timeout}}s --insecure -l {% if rate != 0 %} --rate {{ rate }} {% endif %} {% if transport %} --{{ transport}} {% endif %} {{headers[presetHeaders]}} {% for h in customHeaders %}{% assign s = h | split : ':' %}--header \"{{ s[0] }}: {{ s[1] | strip }}\" {% endfor %} {% if serverUri == blank or serverUri == empty %} {{serverScheme}}://{{serverAddress}}:{{serverPort}}{{path}} {% else %} {{serverUri}}:{{serverPort}}{{path}} {% endif %} {% if bodyFile != blank and bodyFile != empty %} -f {{bodyFile}} {% endif %} {% if certFile != blank and certFile != empty %} --cert {{certFile}} {% endif %} {% if keyFile != blank and keyFile != empty %} --key {{keyFile}} {% endif %} {% if stream != blank and stream != empty %} -s {% endif %} {% if body != blank and body != empty %} -b {{body}} {% endif %} {% if verb != blank and verb != empty %} -m {{verb}} {% endif %}"
onConfigure:
# - job.timeout = Number(job.variables.duration) + Number(job.variables.warmup) + 10;