Inject host count info

Temporary disable omsimulator setup
This commit is contained in:
Ilya Shakhat 2016-03-14 13:53:16 +03:00
parent b3e489cdcb
commit 19e4f64fe9
3 changed files with 56 additions and 21 deletions

View File

@ -49,10 +49,18 @@ def play_execution(runner, execution_playbook):
for task in _pick_tasks(play['tasks'], matrix):
hosts = play['hosts']
# special handling for limiting hosts number
if 'host_count' in task.values()[0]:
hosts = hosts[:task.values()[0]['host_count']]
del task.values()[0]['host_count']
task_play = {
'hosts': play['hosts'],
'hosts': hosts,
'tasks': [task],
}
command_results = runner.run([task_play])
for command_result in command_results:
@ -62,7 +70,8 @@ def play_execution(runner, execution_playbook):
common = dict(id=utils.make_id(),
host=command_result['host'],
status=command_result['status'],
task=command_result['task'])
task=command_result['task'],
host_count=len(hosts))
common.update(payload['invocation']['module_args'])
if 'records' in payload:

View File

@ -2,7 +2,7 @@ OMSimulator Report
------------------
This is the report of execution test plan
:ref:`mq_test_plan` with `Sysbench`_ tool.
:ref:`mq_test_plan` with `OMSimulator`_ tool.
Results
^^^^^^^
@ -18,7 +18,7 @@ Messages per second depending on threads count:
chart: line
pipeline:
- { $match: { task: omsimulator, status: OK }}
- { $group: { _id: { threads: "$threads" },
- { $group: { _id: { threads: { $multiply: [ "$threads", "$host_count" ] } },
msg_sent_per_sec: { $avg: { $divide: ["$count", "$duration"] }},
latency: { $avg: "$latency" }
}}
@ -41,7 +41,7 @@ Messages per second and rabbit CPU consumption depending on threads count:
chart: line
pipeline:
- { $match: { task: omsimulator, status: OK }}
- { $group: { _id: { threads: "$threads" },
- { $group: { _id: { threads: { $multiply: [ "$threads", "$host_count" ] } },
msg_sent_per_sec: { $avg: { $divide: ["$count", "$duration"] }},
rabbit_total: { $avg: "$rabbit_total" }
}}
@ -53,6 +53,22 @@ Messages per second and rabbit CPU consumption depending on threads count:
''' | chart
}}
.. references:
.. _Sysbench: https://github.com/akopytov/sysbench
{{'''
title: Latency depending on msg/sec
axes:
x: messages per sec
y: latency
chart: line
pipeline:
- { $match: { task: omsimulator, status: OK }}
- { $group: { _id: { threads: { $multiply: [ "$threads", "$host_count" ] } },
msg_sent_per_sec: { $avg: { $divide: ["$count", "$duration"] }},
latency: { $avg: "$latency" }
}}
- { $project: { x: "$msg_sent_per_sec",
y: { $multiply: ["$latency", 1000] }
}}
- { $sort: { x: 1 }}
''' | chart
}}

View File

@ -12,33 +12,43 @@ setup:
tasks:
- apt: name=git
become: yes
- name: installing omsimulator
git: repo=git://git.openstack.org/openstack/oslo.messaging
dest=/tmp/performa/oslo.messaging
- command: git fetch https://review.openstack.org/openstack/oslo.messaging refs/changes/91/291191/2
args:
chdir: /tmp/performa/oslo.messaging
- command: git checkout FETCH_HEAD
args:
chdir: /tmp/performa/oslo.messaging
- apt: name=atop
become: yes
- apt: name=daemon
become: yes
# - name: installing omsimulator
# git: repo=git://git.openstack.org/openstack/oslo.messaging
# dest=/tmp/performa/oslo.messaging
# - command: git fetch https://review.openstack.org/openstack/oslo.messaging refs/changes/91/291191/2
# args:
# chdir: /tmp/performa/oslo.messaging
# - command: git checkout FETCH_HEAD
# args:
# chdir: /tmp/performa/oslo.messaging
# - apt: name=atop
# become: yes
# - apt: name=daemon
# become: yes
execution:
-
hosts: {{ target }}
tasks:
- atop: command=start
# -
# hosts: {{ target }}
# matrix:
# threads: [ 1, 2, 5, 10, 25, 50, 100 ]
# tasks:
# - omsimulator:
# mode: call
# duration: 10
# url: "rabbit://stackrabbit:swordfish@localhost:5672/"
-
hosts: {{ target }}
matrix:
threads: [ 1, 2, 5, 10, 25, 50, 100 ]
host_count: [ 1, 2, 3 ]
tasks:
- omsimulator:
mode: call
duration: 10
threads: 1
url: "rabbit://stackrabbit:swordfish@localhost:5672/"
-
hosts: {{ target }}