From 155468865fbc6c8250e6c44e63d7ae8d78791b63 Mon Sep 17 00:00:00 2001 From: Ilya Shakhat Date: Mon, 29 Feb 2016 18:30:22 +0300 Subject: [PATCH] Add rabbit CPU consumption to omsimulator report --- performa/scenarios/mq/omsimulator.rst | 25 ++++++++++++++++++++++++- performa/scenarios/mq/omsimulator.yaml | 10 ++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/performa/scenarios/mq/omsimulator.rst b/performa/scenarios/mq/omsimulator.rst index 28ff24f..dc4c29f 100644 --- a/performa/scenarios/mq/omsimulator.rst +++ b/performa/scenarios/mq/omsimulator.rst @@ -7,7 +7,7 @@ This is the report of execution test plan Results ^^^^^^^ -Chart and table: +Messages per second depending on threads count: {{''' title: Messages per second @@ -27,6 +27,29 @@ Chart and table: ''' | chart }} +Messages per second and rabbit CPU consumption depending on threads count: + +{{''' + title: Queries and and CPU util per second + axes: + x: threads + y: queries per sec + y2: rabbit CPU consumption, % + chart: line + pipeline: + - { $match: { task: omsimulator, status: OK }} + - { $group: { _id: { threads: "$threads" }, + msg_sent_per_sec: { $avg: { $divide: ["$msg_sent", "$duration"] }}, + rabbit_total: { $avg: "$rabbit_total" } + }} + - { $project: { x: "$_id.threads", + y: "$msg_sent_per_sec", + y2: { $multiply: [ "$rabbit_total", 100 ] } + }} + - { $sort: { x: 1 }} +''' | chart +}} + .. references: .. _Sysbench: https://github.com/akopytov/sysbench diff --git a/performa/scenarios/mq/omsimulator.yaml b/performa/scenarios/mq/omsimulator.yaml index 4ee298b..922c9e8 100644 --- a/performa/scenarios/mq/omsimulator.yaml +++ b/performa/scenarios/mq/omsimulator.yaml @@ -36,5 +36,15 @@ execution: command: stop labels: [ CPU, PRC, PRM ] +aggregation: + - + update: + query: + { task: omsimulator } + values: + pipeline: + - { $match: { task: atop, status: OK, label: PRC, name: beam.smp }} + - { $group: { _id: null, rabbit_sys: { $avg: "$sys" }, rabbit_user: { $avg: "$user" }, rabbit_total: { $avg: { $add: [ "$sys", "$user" ] }} }} + report: template: omsimulator.rst