forked from fcsonline/drill
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbenchmark.yml
110 lines (92 loc) · 2.36 KB
/
benchmark.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# Example of a test plan with 100 iterations and ~25 requests each.
# A plan with 2500 requests in total at 5 iterations at the same time,
# and a rampup of 2 seconds.
---
base: 'http://localhost:9000'
iterations: 100
concurrency: 5
rampup: 2
plan:
- name: Include comments
include: comments.yml
- name: Fetch users
request:
url: /api/users.json
- name: Fetch organizations
request:
url: /api/organizations
- name: Fetch account
request:
url: /api/account
assign: foo
- name: Fetch manager user
request:
url: /api/users/{{ foo.body.manager_id }}
- name: Fetch string token
request:
url: /api/tokens/{{ foo.body.token }}
- name: Fetch manager location
request:
url: /api/users/at/{{ foo.body.address.floor }}/{{ foo.body.address.room }}
- name: Assign values
assign:
key: bar
value: "2"
- name: Fetch user from assign
request:
url: /api/users/{{ bar }}
- name: Fetch some users
request:
url: /api/users/{{ item }}
with_items:
- 70
- 73
- 75
- name: Fetch some users by hash
request:
url: /api/users/{{ item.id }}
shuffle: true
with_items:
- { id: 70 }
- { id: 73 }
- { id: 75 }
- name: Assert values
assert:
key: bar
value: "2"
- name: Fetch some users by range, index {{ index }}
request:
url: /api/users/{{ item }}
with_items_range:
start: 70
step: 5
stop: 75
- name: Fetch some users from CSV, index {{ index }}
request:
url: /api/users/contacts/{{ item.id }}
shuffle: true
with_items_from_csv: ./fixtures/users.csv
- name: Fetch some users from CSV (alternate syntax), index {{ index }}
request:
url: /api/users/contacts/{{ item.id }}
with_items_from_csv:
file_name: ./fixtures/users.csv
quote_char: "\'"
- name: POST some crafted JSONs stored in CSV
request:
url: /api/transactions
method: POST
body: '{{ item.txn }}'
headers:
Content-Type: 'application/json'
with_items_from_csv:
file_name: ./fixtures/transactions.csv
quote_char: "\'"
- name: Fetch no relative url
request:
url: http://localhost:9000/api/users.json
- name: Support for POST method
request:
url: /api/users
method: POST
body: foo=bar&arg={{ bar }}