Skip to content

Commit 270eb42

Browse files
committed
light/fixtures: Add new execution start parameters
- these parameters are valid only for performance test execution Signed-off-by: Andras Mitzki <[email protected]>
1 parent 2a63200 commit 270eb42

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

tests/light/src/axosyslog_light/fixtures.py

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,62 @@ def pytest_addoption(parser):
100100
help="Path for report files folder. Default form: 'reports/<current_date>'",
101101
)
102102

103+
parser.addoption(
104+
"--msg-size",
105+
action="store",
106+
default=[256],
107+
type=lambda s: [int(x) for x in s.split(",")],
108+
help="Comma-separated list of message sizes in bytes for performance tests. Example: 512,1024. Default: 256",
109+
)
110+
111+
parser.addoption(
112+
"--input-msg-type",
113+
action="store",
114+
default=["json"],
115+
type=lambda s: [x for x in s.split(",")],
116+
help="Comma-separated list of input message types for performance tests. Example: json,xml. Default: json",
117+
)
118+
119+
parser.addoption(
120+
"--filterx-rule",
121+
action="store",
122+
default=["empty"],
123+
type=lambda s: [x for x in s.split(",")],
124+
help="Comma-separated list of filterx rule types for performance tests. Default: empty",
125+
)
126+
127+
parser.addoption(
128+
"--destination",
129+
action="store",
130+
default=["empty"],
131+
type=lambda s: [x for x in s.split(",")],
132+
help="Comma-separated list of destinations for performance tests. Default: empty",
133+
)
134+
135+
parser.addoption(
136+
"--msg-counter",
137+
action="store",
138+
default=0,
139+
type=int,
140+
help="Number of messages to send for performance tests. Default: 0",
141+
)
142+
143+
parser.addoption(
144+
"--run-time",
145+
action="store",
146+
default=30,
147+
type=int,
148+
help="Number of seconds to run the performance tests. Default: 30",
149+
)
150+
151+
parser.addoption(
152+
"--flow-control",
153+
action="store",
154+
default=["flow-control-off"],
155+
type=lambda s: [x for x in s.split(",")],
156+
help="Comma-separated list of flow control options for performance tests. Default: flow-control-off",
157+
)
158+
103159

104160
def get_current_date():
105161
return datetime.now().strftime("%Y-%m-%d-%H-%M-%S-%f")

0 commit comments

Comments
 (0)