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): 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 = { task_play = {
'hosts': play['hosts'], 'hosts': hosts,
'tasks': [task], 'tasks': [task],
} }
command_results = runner.run([task_play]) command_results = runner.run([task_play])
for command_result in command_results: for command_result in command_results:
@ -62,7 +70,8 @@ def play_execution(runner, execution_playbook):
common = dict(id=utils.make_id(), common = dict(id=utils.make_id(),
host=command_result['host'], host=command_result['host'],
status=command_result['status'], status=command_result['status'],
task=command_result['task']) task=command_result['task'],
host_count=len(hosts))
common.update(payload['invocation']['module_args']) common.update(payload['invocation']['module_args'])
if 'records' in payload: if 'records' in payload:

View File

@ -2,7 +2,7 @@ OMSimulator Report
------------------ ------------------
This is the report of execution test plan This is the report of execution test plan
:ref:`mq_test_plan` with `Sysbench`_ tool. :ref:`mq_test_plan` with `OMSimulator`_ tool.
Results Results
^^^^^^^ ^^^^^^^
@ -18,7 +18,7 @@ Messages per second depending on threads count:
chart: line chart: line
pipeline: pipeline:
- { $match: { task: omsimulator, status: OK }} - { $match: { task: omsimulator, status: OK }}
- { $group: { _id: { threads: "$threads" }, - { $group: { _id: { threads: { $multiply: [ "$threads", "$host_count" ] } },
msg_sent_per_sec: { $avg: { $divide: ["$count", "$duration"] }}, msg_sent_per_sec: { $avg: { $divide: ["$count", "$duration"] }},
latency: { $avg: "$latency" } latency: { $avg: "$latency" }
}} }}
@ -41,7 +41,7 @@ Messages per second and rabbit CPU consumption depending on threads count:
chart: line chart: line
pipeline: pipeline:
- { $match: { task: omsimulator, status: OK }} - { $match: { task: omsimulator, status: OK }}
- { $group: { _id: { threads: "$threads" }, - { $group: { _id: { threads: { $multiply: [ "$threads", "$host_count" ] } },
msg_sent_per_sec: { $avg: { $divide: ["$count", "$duration"] }}, msg_sent_per_sec: { $avg: { $divide: ["$count", "$duration"] }},
rabbit_total: { $avg: "$rabbit_total" } rabbit_total: { $avg: "$rabbit_total" }
}} }}
@ -53,6 +53,22 @@ Messages per second and rabbit CPU consumption depending on threads count:
''' | chart ''' | 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: tasks:
- apt: name=git - apt: name=git
become: yes become: yes
- name: installing omsimulator # - name: installing omsimulator
git: repo=git://git.openstack.org/openstack/oslo.messaging # git: repo=git://git.openstack.org/openstack/oslo.messaging
dest=/tmp/performa/oslo.messaging # dest=/tmp/performa/oslo.messaging
- command: git fetch https://review.openstack.org/openstack/oslo.messaging refs/changes/91/291191/2 # - command: git fetch https://review.openstack.org/openstack/oslo.messaging refs/changes/91/291191/2
args: # args:
chdir: /tmp/performa/oslo.messaging # chdir: /tmp/performa/oslo.messaging
- command: git checkout FETCH_HEAD # - command: git checkout FETCH_HEAD
args: # args:
chdir: /tmp/performa/oslo.messaging # chdir: /tmp/performa/oslo.messaging
- apt: name=atop # - apt: name=atop
become: yes # become: yes
- apt: name=daemon # - apt: name=daemon
become: yes # become: yes
execution: execution:
- -
hosts: {{ target }} hosts: {{ target }}
tasks: tasks:
- atop: command=start - 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 }} hosts: {{ target }}
matrix: matrix:
threads: [ 1, 2, 5, 10, 25, 50, 100 ] host_count: [ 1, 2, 3 ]
tasks: tasks:
- omsimulator: - omsimulator:
mode: call mode: call
duration: 10 duration: 10
threads: 1
url: "rabbit://stackrabbit:swordfish@localhost:5672/" url: "rabbit://stackrabbit:swordfish@localhost:5672/"
- -
hosts: {{ target }} hosts: {{ target }}