diff --git a/doc/source/tools/performa-report.txt b/doc/source/tools/performa-report.txt index 1fb2d95..4f04f3f 100644 --- a/doc/source/tools/performa-report.txt +++ b/doc/source/tools/performa-report.txt @@ -58,8 +58,9 @@ optional arguments: User for connecting to remote systems, defaults to env[PERFORMA_REMOTE_USER]. --scenario SCENARIO Scenario to play. Can be a file name or one of - aliases: "db/sysbench", "mq/omsimulator". Defaults to - env[PERFORMA_SCENARIO]. + aliases: "db/sysbench", "mq/rabbitmq-ha-call", "mq + /rabbitmq-ha-cast", "mq/rabbitmq-ha-notify", + "mq/rabbitmq". Defaults to env[PERFORMA_SCENARIO]. --syslog-log-facility SYSLOG_LOG_FACILITY Syslog facility to receive log lines. This option is ignored if log_config_append is set. diff --git a/doc/source/tools/performa.txt b/doc/source/tools/performa.txt index 912df69..7d13edf 100644 --- a/doc/source/tools/performa.txt +++ b/doc/source/tools/performa.txt @@ -57,8 +57,9 @@ optional arguments: User for connecting to remote systems, defaults to env[PERFORMA_REMOTE_USER]. --scenario SCENARIO Scenario to play. Can be a file name or one of - aliases: "db/sysbench", "mq/omsimulator". Defaults to - env[PERFORMA_SCENARIO]. + aliases: "db/sysbench", "mq/rabbitmq-ha-call", "mq + /rabbitmq-ha-cast", "mq/rabbitmq-ha-notify", + "mq/rabbitmq". Defaults to env[PERFORMA_SCENARIO]. --syslog-log-facility SYSLOG_LOG_FACILITY Syslog facility to receive log lines. This option is ignored if log_config_append is set. diff --git a/etc/performa.conf b/etc/performa.conf index b0b6b37..efdee16 100644 --- a/etc/performa.conf +++ b/etc/performa.conf @@ -99,8 +99,9 @@ # From performa.engine.config # -# Scenario to play. Can be a file name or one of aliases: "db/sysbench", -# "mq/omsimulator". Defaults to env[PERFORMA_SCENARIO]. (string value) +# Scenario to play. Can be a file name or one of aliases: "db/sysbench", "mq +# /rabbitmq-ha-call", "mq/rabbitmq-ha-cast", "mq/rabbitmq-ha-notify", +# "mq/rabbitmq". Defaults to env[PERFORMA_SCENARIO]. (string value) #scenario = # Mongo URL, defaults to env[PERFORMA_MONGO_URL]. (string value) diff --git a/performa/scenarios/mq/omsimulator-threading.yaml b/performa/scenarios/mq/omsimulator-threading.yaml deleted file mode 100644 index 4835cde..0000000 --- a/performa/scenarios/mq/omsimulator-threading.yaml +++ /dev/null @@ -1,122 +0,0 @@ -title: OMSimulator - -description: - This scenario uses oslo.messaging simulator tool to execute MQ test plan. - -parameters: - tester_hosts: List of hosts were omsimulator will be executed - rabbit_hosts: List of hosts were RabbitMQ runs - rabbit_url: RabbitMQ address - client_url: Override RabbitMQ address for the client - server_url: Override RabbitMQ address for the server - -setup: - - - hosts: {{ tester_hosts }} - tasks: - - apt: name=git - become: yes - - apt: name=daemon - become: yes - - name: installing omsimulator - git: repo=git://git.openstack.org/openstack/oslo.messaging - dest=/tmp/performa/oslo.messaging - - apt: name=python-dev - become: yes - - apt: name=python-pip - become: yes - - pip: name=virtualenv - become: yes - - pip: requirements=/tmp/performa/oslo.messaging/requirements.txt virtualenv=/tmp/performa/oslo.messaging/.venv - - pip: name=eventlet virtualenv=/tmp/performa/oslo.messaging/.venv - - command: /tmp/performa/oslo.messaging/.venv/bin/python setup.py install - args: - chdir: /tmp/performa/oslo.messaging - - - hosts: {{ rabbit_hosts }} - tasks: - - apt: name=atop - become: yes - - apt: name=daemon - become: yes - - -execution: - - - hosts: {{ rabbit_hosts }} - tasks: - - atop: command=start - - - hosts: {{ tester_hosts }} - matrix: - threads: [ 1, 2, 5, 10, 20, 50 ] - tasks: - - omsimulator: - mode: call - duration: 100 - url: {{ rabbit_url }} - client_url: {{ client_url }} - server_url: {{ server_url }} - - - hosts: {{ tester_hosts }} - matrix: - threads: [ 1, 2, 5, 10, 20, 50 ] - tasks: - - omsimulator: - mode: cast - duration: 100 - url: {{ rabbit_url }} - client_url: {{ client_url }} - server_url: {{ server_url }} - - - hosts: {{ tester_hosts }} - matrix: - threads: [ 1, 2, 5, 10, 20, 50 ] - tasks: - - omsimulator: - mode: notify - duration: 100 - url: {{ rabbit_url }} - client_url: {{ client_url }} - server_url: {{ server_url }} - - - hosts: {{ rabbit_hosts }} - tasks: - - atop: - command: stop - labels: [ PRC ] - -aggregation: - - - update: - query: - { task: omsimulator } - values: - pipeline: - - $match: { task: atop, status: OK, label: PRC, name: { $regex: beam.* }, host: {{ rabbit_hosts[0] }} } - - $group: { _id: null, rabbit_sys_0: { $avg: "$sys" }, rabbit_user_0: { $avg: "$user" }, rabbit_total_0: { $avg: { $add: [ "$sys", "$user" ] }} } - -{% if rabbit_hosts[1] %} - - - update: - query: - { task: omsimulator } - values: - pipeline: - - $match: { task: atop, status: OK, label: PRC, name: { $regex: beam.* }, host: {{ rabbit_hosts[1] }} } - - $group: { _id: null, rabbit_sys_1: { $avg: "$sys" }, rabbit_user_1: { $avg: "$user" }, rabbit_total_1: { $avg: { $add: [ "$sys", "$user" ] }} } -{% endif %} - -{% if rabbit_hosts[2] %} - - - update: - query: - { task: omsimulator } - values: - pipeline: - - $match: { task: atop, status: OK, label: PRC, name: { $regex: beam.* }, host: {{ rabbit_hosts[2] }} } - - $group: { _id: null, rabbit_sys_2: { $avg: "$sys" }, rabbit_user_2: { $avg: "$user" }, rabbit_total_2: { $avg: { $add: [ "$sys", "$user" ] }} } -{% endif %} - -report: - template: omsimulator.rst diff --git a/performa/scenarios/mq/omsimulator-ha-call.rst b/performa/scenarios/mq/rabbitmq-ha-call.rst similarity index 100% rename from performa/scenarios/mq/omsimulator-ha-call.rst rename to performa/scenarios/mq/rabbitmq-ha-call.rst diff --git a/performa/scenarios/mq/omsimulator-ha-call.yaml b/performa/scenarios/mq/rabbitmq-ha-call.yaml similarity index 97% rename from performa/scenarios/mq/omsimulator-ha-call.yaml rename to performa/scenarios/mq/rabbitmq-ha-call.yaml index b5b3b57..78c702a 100644 --- a/performa/scenarios/mq/omsimulator-ha-call.yaml +++ b/performa/scenarios/mq/rabbitmq-ha-call.yaml @@ -46,4 +46,4 @@ execution: server_url: {{ server_url }} report: - template: omsimulator-ha-call.rst + template: rabbitmq-ha-call.rst diff --git a/performa/scenarios/mq/omsimulator-ha-cast.rst b/performa/scenarios/mq/rabbitmq-ha-cast.rst similarity index 100% rename from performa/scenarios/mq/omsimulator-ha-cast.rst rename to performa/scenarios/mq/rabbitmq-ha-cast.rst diff --git a/performa/scenarios/mq/omsimulator-ha-cast.yaml b/performa/scenarios/mq/rabbitmq-ha-cast.yaml similarity index 97% rename from performa/scenarios/mq/omsimulator-ha-cast.yaml rename to performa/scenarios/mq/rabbitmq-ha-cast.yaml index 3b19d5c..b169ac6 100644 --- a/performa/scenarios/mq/omsimulator-ha-cast.yaml +++ b/performa/scenarios/mq/rabbitmq-ha-cast.yaml @@ -46,4 +46,4 @@ execution: server_url: {{ server_url }} report: - template: omsimulator-ha-cast.rst + template: rabbitmq-ha-cast.rst diff --git a/performa/scenarios/mq/omsimulator-ha-notify.rst b/performa/scenarios/mq/rabbitmq-ha-notify.rst similarity index 100% rename from performa/scenarios/mq/omsimulator-ha-notify.rst rename to performa/scenarios/mq/rabbitmq-ha-notify.rst diff --git a/performa/scenarios/mq/omsimulator-ha-notify.yaml b/performa/scenarios/mq/rabbitmq-ha-notify.yaml similarity index 97% rename from performa/scenarios/mq/omsimulator-ha-notify.yaml rename to performa/scenarios/mq/rabbitmq-ha-notify.yaml index e3355a5..90f758b 100644 --- a/performa/scenarios/mq/omsimulator-ha-notify.yaml +++ b/performa/scenarios/mq/rabbitmq-ha-notify.yaml @@ -46,4 +46,4 @@ execution: server_url: {{ server_url }} report: - template: omsimulator-ha-notify.rst + template: rabbitmq-ha-notify.rst diff --git a/performa/scenarios/mq/omsimulator.rst b/performa/scenarios/mq/rabbitmq.rst similarity index 100% rename from performa/scenarios/mq/omsimulator.rst rename to performa/scenarios/mq/rabbitmq.rst diff --git a/performa/scenarios/mq/omsimulator.yaml b/performa/scenarios/mq/rabbitmq.yaml similarity index 99% rename from performa/scenarios/mq/omsimulator.yaml rename to performa/scenarios/mq/rabbitmq.yaml index c0c8f94..a274b77 100644 --- a/performa/scenarios/mq/omsimulator.yaml +++ b/performa/scenarios/mq/rabbitmq.yaml @@ -122,4 +122,4 @@ aggregation: {% endif %} report: - template: omsimulator.rst + template: rabbitmq.rst diff --git a/performa/tests/test_omsimulator.py b/performa/tests/test_omsimulator.py deleted file mode 100644 index 9677110..0000000 --- a/performa/tests/test_omsimulator.py +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright (c) 2016 OpenStack Foundation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import testtools - -from performa.modules import omsimulator - - -def _read_sample(): - with open('performa/tests/omsimulator_sample.txt') as f: - return f.read() - - -class TestOMSimulator(testtools.TestCase): - def test_parse_client_call(self): - expected = dict(msg_sent=5313, bytes_sent=14897652, duration=10, - msg_sent_bandwidth=531, bytes_sent_bandwidth=1489765) - - self.assertEqual(expected, omsimulator.parse_output(_read_sample()))