-
Notifications
You must be signed in to change notification settings - Fork 2
/
cardamon.toml
138 lines (133 loc) · 4.07 KB
/
cardamon.toml
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
[cpu]
name = "AMD Ryzen 7 PRO 6850U with Radeon Graphics"
curve = [7.627190097500079,0.07551567953624883,20.45110313049153,-1.5261422759740344]
# Processes
# ---------
# This array of tables describes the components of your application that you
# would like cardamon to measure.
#
# processes contain the following properties:
# name:
# type - string
# desc - must be unique
# required - true
#
# up:
# type - string
# desc - command to execute the processes
# required - true
#
# down:
# type - string
# desc - command to stop the process. In the case of bare-metal processes
# cardamon will pass the PID of the process to this command. You can
# use `{pid}` as a placeholder in the command e.g. `kill {pid}`.
# default: empty string
# required - false
#
# proccess.type:
# type - "baremetal" | "docker"
# desc - the type of process which is being executed
# required - true
#
# process.containers:
# type - string[]
# desc - docker processes may initiate multiple containers from a single
# command, e.g. `docker compose up -d`. This is the list of
# containers started by this process you would like cardamon to
# measure.
# required - true (if `process.type` is "docker")
#
# redirect.to:
# type - "null" | "parent" | "file"
# desc - where to redirect this processes stdout and stderr. "null" ignores
# output, "parent" attaches the processes output to cardamon, "file"
# writes stdout and stderr to a file of the same name as this
# process e.g. db.stdout.
# default: "file"
# required - false
#
# EXAMPLE
# -------
# [[process]]
# name = "db"
# up = "docker compose up -d"
# down = "docker compose down"
# redirect.to = "file"
# process.type = "docker"
# process.containers = ["postgres"]
[[process]]
name = "test_proc"
up = "bash -c \"while true; do shuf -i 0-1337 -n 1; done\""
down = "kill {pid}"
redirect.to = "file"
process.type = "baremetal"
# Scenarios
# ---------
# This array of tables describes the scenarios that cardamon can run. They can
# be any kind of executable and are designed to place your application under
# consistent load each time they are run. Examples include bash scripts which
# `curl` a REST endpoint or nodejs scripts using playwright.js to control a
# webpage.
#
# scenarios contain the following properties:
# name:
# type - string
# desc - must be unique
# required - true
#
# desc:
# type - string
# desc - a short description of the scenario to remind you what it does
# required - false
#
# command:
# type - string
# desc - the command to execute this scenario
# required - true
#
# iterations:
# type - integer
# desc - the number of times cardamon should execute this scenario per run.
# It's better to run scenarios multiple times and take an average.
# default - 1
# required - false
#
# processes:
# type - string[]
# desc - a list of the processes which need to be started before executing
# this scenario.
# required - true
#
[[scenario]]
name = "sleep"
desc = "Sleeps for 10 seconds, a real scenario would call your app"
command = "sleep 10"
iterations = 2
processes = ["test_proc"]
# Observations
# ---------------
# This array of tables allows you to group scenarios together to make it
# easier to execute multiple scenarios in a single run.
#
# obserations contain the following properties:
# name:
# type - string
# desc - a unique name
# required - true
#
# observe.scenarios:
# type - string[]
# desc - a list of scenarios to execute whilst observing the processes
# required to run all scenarios
# required - required if observe.processes is not defined
#
# observe.processes:
# type - string[]
# desc - a list of processes to execute and observe. Running an observation
# with this property set runs Cardamon in Live mode.
# required - required if observe.scenarios is not defined.
#
[[observation]]
name = "test_obs"
scenarios = ["sleep"]