mirror of
https://framagit.org/ppom/reaction
synced 2026-03-14 12:45:47 +01:00
74 lines
1.8 KiB
YAML
74 lines
1.8 KiB
YAML
---
|
|
# This configuration permits to test reaction's performance
|
|
# under a very high load
|
|
#
|
|
# It keeps regexes super simple, to avoid benchmarking the `regex` crate,
|
|
# and benchmark reaction's internals instead.
|
|
concurrency: 32
|
|
|
|
patterns:
|
|
num:
|
|
regex: '[0-9]{3}'
|
|
ip:
|
|
regex: '(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3})|(?:[0-9a-fA-F:]{2,90})'
|
|
ignore:
|
|
- 1.0.0.1
|
|
|
|
streams:
|
|
tailDown1:
|
|
cmd: [ 'sh', '-c', 'sleep 2; seq 1001 | while read i; do echo found $i; done' ]
|
|
filters:
|
|
find1:
|
|
regex:
|
|
- '^found <num>'
|
|
retry: 9
|
|
retryperiod: 6m
|
|
actions:
|
|
damn:
|
|
cmd: [ 'sleep', '0.0<num>' ]
|
|
undamn:
|
|
cmd: [ 'sleep', '0.0<num>' ]
|
|
after: 1m
|
|
onexit: false
|
|
tailDown2:
|
|
cmd: [ 'sh', '-c', 'sleep 2; seq 100100 | while read i; do echo found $i; echo trouvé $i; done' ]
|
|
filters:
|
|
find2:
|
|
regex:
|
|
- '^found <num>'
|
|
retry: 480
|
|
retryperiod: 6m
|
|
actions:
|
|
damn:
|
|
cmd: [ 'sleep', '0.0<num>' ]
|
|
undamn:
|
|
cmd: [ 'sleep', '0.0<num>' ]
|
|
after: 1m
|
|
onexit: false
|
|
tailDown3:
|
|
cmd: [ 'sh', '-c', 'sleep 2; seq 100100 | while read i; do echo found $i; echo trouvé $i; done' ]
|
|
filters:
|
|
find3:
|
|
regex:
|
|
- '^found <num>'
|
|
retry: 480
|
|
retryperiod: 6m
|
|
actions:
|
|
damn:
|
|
cmd: [ 'sleep', '0.0<num>' ]
|
|
undamn:
|
|
cmd: [ 'sleep', '0.0<num>' ]
|
|
after: 1m
|
|
onexit: false
|
|
find4:
|
|
regex:
|
|
- '^trouvé <num>'
|
|
retry: 480
|
|
retryperiod: 6m
|
|
actions:
|
|
damn:
|
|
cmd: [ 'sleep', '0.0<num>' ]
|
|
undamn:
|
|
cmd: [ 'sleep', '0.0<num>' ]
|
|
after: 1m
|
|
onexit: false
|