-
Notifications
You must be signed in to change notification settings - Fork 109
/
Copy pathwrk.yml
38 lines (37 loc) · 2.31 KB
/
wrk.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
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:
wrk:
source:
repository: https://github.com/dotnet/crank.git
branchOrCommit: main
project: src/Microsoft.Crank.Jobs.Wrk/Microsoft.Crank.Jobs.Wrk.csproj
sourceKey: wrk
noBuild: true
isConsoleApp: true
waitForExit: true
variables:
connections: 256 # total number of HTTP connections to keep open with each thread handling N = connections/threads
duration: 15 # duration in seconds
timeout: # timeout in seconds (optional)
warmup: 15 # warmup in seconds
threads: 32 # total number of threads to use
pipeline: 1
script: '' # path or url of a LUA script, e.g., https://raw.githubusercontent.com/wg/wrk/master/scripts/post.lua
scriptArguments: '' # arguments passed to the script, e.g., 16
serverScheme: http
serverAddress: localhost
serverPort: 5000
path: /
customHeaders: [ ] # list of headers with the format: '<name1>: <value1>', e.g. [ 'content-type: application/json' ]
arguments: "-c {{connections}} {% if serverUri == blank or serverUri == empty %} {{serverScheme}}://{{serverAddress}}:{{serverPort}}{{path}} {% else %} {{serverUri}}:{{serverPort}}{{path}} {% endif %} --latency -d {{duration}}s -w {{warmup}}s {% if timeout != blank and timeout != empty %} --timeout {{timeout}}s {% endif %} -t {{threads}} {{headers[presetHeaders]}} {% for h in customHeaders %}{% assign s = h | split : ':' %}--header \"{{ s[0] }}: {{ s[1] | strip }}\" {% endfor %} {% if pipeline > 1 %} -s scripts/pipeline.lua -- {{ pipeline }} {% elsif script != blank and script != empty %} -s {{script}} -- {{scriptArguments}} {% endif %}"
options:
requiredOperatingSystem: linux
onConfigure:
# - job.timeout = Number(job.variables.duration) + Number(job.variables.warmup) + 10;