From 49c804937d58ca1b5f12f5a54b108820a1fe9f66 Mon Sep 17 00:00:00 2001 From: David Wilson Date: Sat, 11 Aug 2018 17:24:31 +0100 Subject: [PATCH] tests: import 2 more simple benchmarks. --- tests/ansible/bench/loop-100-items.yml | 10 +++ tests/ansible/bench/loop-100-tasks.yml | 112 +++++++++++++++++++++++++ 2 files changed, 122 insertions(+) create mode 100644 tests/ansible/bench/loop-100-items.yml create mode 100644 tests/ansible/bench/loop-100-tasks.yml diff --git a/tests/ansible/bench/loop-100-items.yml b/tests/ansible/bench/loop-100-items.yml new file mode 100644 index 00000000..0feb57c5 --- /dev/null +++ b/tests/ansible/bench/loop-100-items.yml @@ -0,0 +1,10 @@ +# Execute 'hostname' 100 times in a loop. Loops execute within TaskExecutor +# within a single WorkerProcess, each iteration is a fair approximation of the +# non-controller overhead involved in executing a task. +# +# See also: loop-100-tasks.yml +# +- hosts: all + tasks: + - command: hostname + with_sequence: start=1 end=100 diff --git a/tests/ansible/bench/loop-100-tasks.yml b/tests/ansible/bench/loop-100-tasks.yml new file mode 100644 index 00000000..bf6e31b8 --- /dev/null +++ b/tests/ansible/bench/loop-100-tasks.yml @@ -0,0 +1,112 @@ +# Execute 'hostname' 100 times, using 100 individual tasks. Each task causes a +# new WorkerProcess to be forked, along with get_vars() calculation, and in the +# Mitogen extension, reestablishment of the UNIX socket connectionto the +# multiplexer process. +# +# It does not measure at least module dependency scanning (cached after first +# iteration). +# +# See also: loop-100-items.yml +# +- hosts: all + tasks: + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname + - command: hostname