Skip to content

Commit cbd1812

Browse files
committed
feat(stress): improve test2
1 parent e16dce9 commit cbd1812

File tree

2 files changed

+11
-16
lines changed

2 files changed

+11
-16
lines changed

collections/requirements.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
---
22
collections:
33
- pureport.fabric
4-
4+
- community.general

stress-tests/test2.yml

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,16 @@
1-
---
2-
- name: Generate fast, large debug output with long random lines
1+
- name: Generate fast, huge output with debug
32
hosts: localhost
43
gather_facts: no
4+
55
vars:
6-
total_messages: 1000
7-
line_length: 3000
6+
total_messages: 5000
87

98
tasks:
9+
- name: Install required package
10+
ansible.builtin.pip:
11+
name: petname
1012

11-
- name: Generate random lines
12-
vars:
13-
chars: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
14-
debug:
15-
msg: "{{ item }}"
16-
loop: >
17-
{{
18-
range(1, total_messages + 1) | map('int') |
19-
map('regex_replace', '.*', chars | community.general.random_choice(length=line_length)) |
20-
list
21-
}}
13+
- name: Print fast debug messages in loop
14+
ansible.builtin.debug:
15+
var: lookup('community.general.random_pet', words=300)
16+
loop: "{{ range(1, total_messages + 1) | list }}"

0 commit comments

Comments
 (0)