Browse Source

Inject host count info

Temporary disable omsimulator setup
Ilya Shakhat 3 years ago
parent
commit
19e4f64fe9

+ 11
- 2
performa/engine/player.py View File

@@ -49,10 +49,18 @@ def play_execution(runner, execution_playbook):
49 49
 
50 50
         for task in _pick_tasks(play['tasks'], matrix):
51 51
 
52
+            hosts = play['hosts']
53
+
54
+            # special handling for limiting hosts number
55
+            if 'host_count' in task.values()[0]:
56
+                hosts = hosts[:task.values()[0]['host_count']]
57
+                del task.values()[0]['host_count']
58
+
52 59
             task_play = {
53
-                'hosts': play['hosts'],
60
+                'hosts': hosts,
54 61
                 'tasks': [task],
55 62
             }
63
+
56 64
             command_results = runner.run([task_play])
57 65
 
58 66
             for command_result in command_results:
@@ -62,7 +70,8 @@ def play_execution(runner, execution_playbook):
62 70
                     common = dict(id=utils.make_id(),
63 71
                                   host=command_result['host'],
64 72
                                   status=command_result['status'],
65
-                                  task=command_result['task'])
73
+                                  task=command_result['task'],
74
+                                  host_count=len(hosts))
66 75
                     common.update(payload['invocation']['module_args'])
67 76
 
68 77
                     if 'records' in payload:

+ 21
- 5
performa/scenarios/mq/omsimulator.rst View File

@@ -2,7 +2,7 @@ OMSimulator Report
2 2
 ------------------
3 3
 
4 4
 This is the report of execution test plan
5
-:ref:`mq_test_plan` with `Sysbench`_ tool.
5
+:ref:`mq_test_plan` with `OMSimulator`_ tool.
6 6
 
7 7
 Results
8 8
 ^^^^^^^
@@ -18,7 +18,7 @@ Messages per second depending on threads count:
18 18
     chart: line
19 19
     pipeline:
20 20
     - { $match: { task: omsimulator, status: OK }}
21
-    - { $group: { _id: { threads: "$threads" },
21
+    - { $group: { _id: { threads: { $multiply: [ "$threads", "$host_count" ] } },
22 22
                   msg_sent_per_sec: { $avg: { $divide: ["$count", "$duration"] }},
23 23
                   latency: { $avg: "$latency" }
24 24
                 }}
@@ -41,7 +41,7 @@ Messages per second and rabbit CPU consumption depending on threads count:
41 41
     chart: line
42 42
     pipeline:
43 43
     - { $match: { task: omsimulator, status: OK }}
44
-    - { $group: { _id: { threads: "$threads" },
44
+    - { $group: { _id: { threads: { $multiply: [ "$threads", "$host_count" ] } },
45 45
                   msg_sent_per_sec: { $avg: { $divide: ["$count", "$duration"] }},
46 46
                   rabbit_total: { $avg: "$rabbit_total" }
47 47
                 }}
@@ -53,6 +53,22 @@ Messages per second and rabbit CPU consumption depending on threads count:
53 53
 ''' | chart
54 54
 }}
55 55
 
56
-.. references:
57 56
 
58
-.. _Sysbench: https://github.com/akopytov/sysbench
57
+{{'''
58
+    title: Latency depending on msg/sec
59
+    axes:
60
+      x: messages per sec
61
+      y: latency
62
+    chart: line
63
+    pipeline:
64
+    - { $match: { task: omsimulator, status: OK }}
65
+    - { $group: { _id: { threads: { $multiply: [ "$threads", "$host_count" ] } },
66
+                  msg_sent_per_sec: { $avg: { $divide: ["$count", "$duration"] }},
67
+                  latency: { $avg: "$latency" }
68
+                }}
69
+    - { $project: { x: "$msg_sent_per_sec",
70
+                    y: { $multiply: ["$latency", 1000] }
71
+                  }}
72
+    - { $sort: { x: 1 }}
73
+''' | chart
74
+}}

+ 24
- 14
performa/scenarios/mq/omsimulator.yaml View File

@@ -12,33 +12,43 @@ setup:
12 12
     tasks:
13 13
     - apt: name=git
14 14
       become: yes
15
-    - name: installing omsimulator
16
-      git: repo=git://git.openstack.org/openstack/oslo.messaging
17
-           dest=/tmp/performa/oslo.messaging
18
-    - command: git fetch https://review.openstack.org/openstack/oslo.messaging refs/changes/91/291191/2
19
-      args:
20
-        chdir: /tmp/performa/oslo.messaging
21
-    - command: git checkout FETCH_HEAD
22
-      args:
23
-        chdir: /tmp/performa/oslo.messaging
24
-    - apt: name=atop
25
-      become: yes
26
-    - apt: name=daemon
27
-      become: yes
15
+#    - name: installing omsimulator
16
+#      git: repo=git://git.openstack.org/openstack/oslo.messaging
17
+#           dest=/tmp/performa/oslo.messaging
18
+#    - command: git fetch https://review.openstack.org/openstack/oslo.messaging refs/changes/91/291191/2
19
+#      args:
20
+#        chdir: /tmp/performa/oslo.messaging
21
+#    - command: git checkout FETCH_HEAD
22
+#      args:
23
+#        chdir: /tmp/performa/oslo.messaging
24
+#    - apt: name=atop
25
+#      become: yes
26
+#    - apt: name=daemon
27
+#      become: yes
28 28
 
29 29
 execution:
30 30
   -
31 31
     hosts: {{ target }}
32 32
     tasks:
33 33
     - atop: command=start
34
+#  -
35
+#    hosts: {{ target }}
36
+#    matrix:
37
+#      threads: [ 1, 2, 5, 10, 25, 50, 100 ]
38
+#    tasks:
39
+#    - omsimulator:
40
+#        mode: call
41
+#        duration: 10
42
+#        url: "rabbit://stackrabbit:swordfish@localhost:5672/"
34 43
   -
35 44
     hosts: {{ target }}
36 45
     matrix:
37
-      threads: [ 1, 2, 5, 10, 25, 50, 100 ]
46
+      host_count: [ 1, 2, 3 ]
38 47
     tasks:
39 48
     - omsimulator:
40 49
         mode: call
41 50
         duration: 10
51
+        threads: 1
42 52
         url: "rabbit://stackrabbit:swordfish@localhost:5672/"
43 53
   -
44 54
     hosts: {{ target }}

Loading…
Cancel
Save