Browse Source

Rename and unify MQ / RabbitMQ scenarios

Change-Id: If6d2fedc54cb0b3686d9eb51a2bafe836bb0189e
Ilya Shakhat 3 years ago
parent
commit
0176a979bc

+ 3
- 2
doc/source/tools/performa-report.txt View File

@@ -58,8 +58,9 @@ optional arguments:
58 58
                         User for connecting to remote systems, defaults to
59 59
                         env[PERFORMA_REMOTE_USER].
60 60
   --scenario SCENARIO   Scenario to play. Can be a file name or one of
61
-                        aliases: "db/sysbench", "mq/omsimulator". Defaults to
62
-                        env[PERFORMA_SCENARIO].
61
+                        aliases: "db/sysbench", "mq/rabbitmq-ha-call", "mq
62
+                        /rabbitmq-ha-cast", "mq/rabbitmq-ha-notify",
63
+                        "mq/rabbitmq". Defaults to env[PERFORMA_SCENARIO].
63 64
   --syslog-log-facility SYSLOG_LOG_FACILITY
64 65
                         Syslog facility to receive log lines. This option is
65 66
                         ignored if log_config_append is set.

+ 3
- 2
doc/source/tools/performa.txt View File

@@ -57,8 +57,9 @@ optional arguments:
57 57
                         User for connecting to remote systems, defaults to
58 58
                         env[PERFORMA_REMOTE_USER].
59 59
   --scenario SCENARIO   Scenario to play. Can be a file name or one of
60
-                        aliases: "db/sysbench", "mq/omsimulator". Defaults to
61
-                        env[PERFORMA_SCENARIO].
60
+                        aliases: "db/sysbench", "mq/rabbitmq-ha-call", "mq
61
+                        /rabbitmq-ha-cast", "mq/rabbitmq-ha-notify",
62
+                        "mq/rabbitmq". Defaults to env[PERFORMA_SCENARIO].
62 63
   --syslog-log-facility SYSLOG_LOG_FACILITY
63 64
                         Syslog facility to receive log lines. This option is
64 65
                         ignored if log_config_append is set.

+ 3
- 2
etc/performa.conf View File

@@ -99,8 +99,9 @@
99 99
 # From performa.engine.config
100 100
 #
101 101
 
102
-# Scenario to play. Can be a file name or one of aliases: "db/sysbench",
103
-# "mq/omsimulator". Defaults to env[PERFORMA_SCENARIO]. (string value)
102
+# Scenario to play. Can be a file name or one of aliases: "db/sysbench", "mq
103
+# /rabbitmq-ha-call", "mq/rabbitmq-ha-cast", "mq/rabbitmq-ha-notify",
104
+# "mq/rabbitmq". Defaults to env[PERFORMA_SCENARIO]. (string value)
104 105
 #scenario = <None>
105 106
 
106 107
 # Mongo URL, defaults to env[PERFORMA_MONGO_URL]. (string value)

+ 0
- 122
performa/scenarios/mq/omsimulator-threading.yaml View File

@@ -1,122 +0,0 @@
1
-title: OMSimulator
2
-
3
-description:
4
-  This scenario uses oslo.messaging simulator tool to execute MQ test plan.
5
-
6
-parameters:
7
-  tester_hosts: List of hosts were omsimulator will be executed
8
-  rabbit_hosts: List of hosts were RabbitMQ runs
9
-  rabbit_url: RabbitMQ address
10
-  client_url: Override RabbitMQ address for the client
11
-  server_url: Override RabbitMQ address for the server
12
-
13
-setup:
14
-  -
15
-    hosts: {{ tester_hosts }}
16
-    tasks:
17
-    - apt: name=git
18
-      become: yes
19
-    - apt: name=daemon
20
-      become: yes
21
-    - name: installing omsimulator
22
-      git: repo=git://git.openstack.org/openstack/oslo.messaging
23
-           dest=/tmp/performa/oslo.messaging
24
-    - apt: name=python-dev
25
-      become: yes
26
-    - apt: name=python-pip
27
-      become: yes
28
-    - pip: name=virtualenv
29
-      become: yes
30
-    - pip: requirements=/tmp/performa/oslo.messaging/requirements.txt virtualenv=/tmp/performa/oslo.messaging/.venv
31
-    - pip: name=eventlet virtualenv=/tmp/performa/oslo.messaging/.venv
32
-    - command: /tmp/performa/oslo.messaging/.venv/bin/python setup.py install
33
-      args:
34
-        chdir: /tmp/performa/oslo.messaging
35
-  -
36
-    hosts: {{ rabbit_hosts }}
37
-    tasks:
38
-    - apt: name=atop
39
-      become: yes
40
-    - apt: name=daemon
41
-      become: yes
42
-
43
-
44
-execution:
45
-  -
46
-    hosts: {{ rabbit_hosts }}
47
-    tasks:
48
-    - atop: command=start
49
-  -
50
-    hosts: {{ tester_hosts }}
51
-    matrix:
52
-      threads: [ 1, 2, 5, 10, 20, 50 ]
53
-    tasks:
54
-    - omsimulator:
55
-        mode: call
56
-        duration: 100
57
-        url: {{ rabbit_url }}
58
-        client_url: {{ client_url }}
59
-        server_url: {{ server_url }}
60
-  -
61
-    hosts: {{ tester_hosts }}
62
-    matrix:
63
-      threads: [ 1, 2, 5, 10, 20, 50 ]
64
-    tasks:
65
-    - omsimulator:
66
-        mode: cast
67
-        duration: 100
68
-        url: {{ rabbit_url }}
69
-        client_url: {{ client_url }}
70
-        server_url: {{ server_url }}
71
-  -
72
-    hosts: {{ tester_hosts }}
73
-    matrix:
74
-      threads: [ 1, 2, 5, 10, 20, 50 ]
75
-    tasks:
76
-    - omsimulator:
77
-        mode: notify
78
-        duration: 100
79
-        url: {{ rabbit_url }}
80
-        client_url: {{ client_url }}
81
-        server_url: {{ server_url }}
82
-  -
83
-    hosts: {{ rabbit_hosts }}
84
-    tasks:
85
-    - atop:
86
-        command: stop
87
-        labels: [ PRC ]
88
-
89
-aggregation:
90
-  -
91
-    update:
92
-      query:
93
-        { task: omsimulator }
94
-      values:
95
-        pipeline:
96
-        - $match: { task: atop, status: OK, label: PRC, name: { $regex: beam.* }, host: {{ rabbit_hosts[0] }} }
97
-        - $group: { _id: null, rabbit_sys_0: { $avg: "$sys" }, rabbit_user_0: { $avg: "$user" }, rabbit_total_0: { $avg: { $add: [ "$sys", "$user" ] }} }
98
-
99
-{% if rabbit_hosts[1] %}
100
-  -
101
-    update:
102
-      query:
103
-        { task: omsimulator }
104
-      values:
105
-        pipeline:
106
-        - $match: { task: atop, status: OK, label: PRC, name: { $regex: beam.* }, host: {{ rabbit_hosts[1] }} }
107
-        - $group: { _id: null, rabbit_sys_1: { $avg: "$sys" }, rabbit_user_1: { $avg: "$user" }, rabbit_total_1: { $avg: { $add: [ "$sys", "$user" ] }} }
108
-{% endif %}
109
-
110
-{% if rabbit_hosts[2] %}
111
-  -
112
-    update:
113
-      query:
114
-        { task: omsimulator }
115
-      values:
116
-        pipeline:
117
-        - $match: { task: atop, status: OK, label: PRC, name: { $regex: beam.* }, host: {{ rabbit_hosts[2] }} }
118
-        - $group: { _id: null, rabbit_sys_2: { $avg: "$sys" }, rabbit_user_2: { $avg: "$user" }, rabbit_total_2: { $avg: { $add: [ "$sys", "$user" ] }} }
119
-{% endif %}
120
-
121
-report:
122
-  template: omsimulator.rst

performa/scenarios/mq/omsimulator-ha-call.rst → performa/scenarios/mq/rabbitmq-ha-call.rst View File


performa/scenarios/mq/omsimulator-ha-call.yaml → performa/scenarios/mq/rabbitmq-ha-call.yaml View File

@@ -46,4 +46,4 @@ execution:
46 46
         server_url: {{ server_url }}
47 47
 
48 48
 report:
49
-  template: omsimulator-ha-call.rst
49
+  template: rabbitmq-ha-call.rst

performa/scenarios/mq/omsimulator-ha-cast.rst → performa/scenarios/mq/rabbitmq-ha-cast.rst View File


performa/scenarios/mq/omsimulator-ha-cast.yaml → performa/scenarios/mq/rabbitmq-ha-cast.yaml View File

@@ -46,4 +46,4 @@ execution:
46 46
         server_url: {{ server_url }}
47 47
 
48 48
 report:
49
-  template: omsimulator-ha-cast.rst
49
+  template: rabbitmq-ha-cast.rst

performa/scenarios/mq/omsimulator-ha-notify.rst → performa/scenarios/mq/rabbitmq-ha-notify.rst View File


performa/scenarios/mq/omsimulator-ha-notify.yaml → performa/scenarios/mq/rabbitmq-ha-notify.yaml View File

@@ -46,4 +46,4 @@ execution:
46 46
         server_url: {{ server_url }}
47 47
 
48 48
 report:
49
-  template: omsimulator-ha-notify.rst
49
+  template: rabbitmq-ha-notify.rst

performa/scenarios/mq/omsimulator.rst → performa/scenarios/mq/rabbitmq.rst View File


performa/scenarios/mq/omsimulator.yaml → performa/scenarios/mq/rabbitmq.yaml View File

@@ -122,4 +122,4 @@ aggregation:
122 122
 {% endif %}
123 123
 
124 124
 report:
125
-  template: omsimulator.rst
125
+  template: rabbitmq.rst

+ 0
- 31
performa/tests/test_omsimulator.py View File

@@ -1,31 +0,0 @@
1
-# Copyright (c) 2016 OpenStack Foundation
2
-#
3
-# Licensed under the Apache License, Version 2.0 (the "License");
4
-# you may not use this file except in compliance with the License.
5
-# You may obtain a copy of the License at
6
-#
7
-#   http://www.apache.org/licenses/LICENSE-2.0
8
-#
9
-# Unless required by applicable law or agreed to in writing, software
10
-# distributed under the License is distributed on an "AS IS" BASIS,
11
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
12
-# implied.
13
-# See the License for the specific language governing permissions and
14
-# limitations under the License.
15
-
16
-import testtools
17
-
18
-from performa.modules import omsimulator
19
-
20
-
21
-def _read_sample():
22
-    with open('performa/tests/omsimulator_sample.txt') as f:
23
-        return f.read()
24
-
25
-
26
-class TestOMSimulator(testtools.TestCase):
27
-    def test_parse_client_call(self):
28
-        expected = dict(msg_sent=5313, bytes_sent=14897652, duration=10,
29
-                        msg_sent_bandwidth=531, bytes_sent_bandwidth=1489765)
30
-
31
-        self.assertEqual(expected, omsimulator.parse_output(_read_sample()))

Loading…
Cancel
Save