Public Repository

Last pushed: 5 months ago
Short Description
This image provides benchmark & result view for RabbitMQ.
Full Description

rabbitmq-perf-html

Description

This image provides benchmark & result view for RabbitMQ.

How to use this image

Create view html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>RabbitMQ Performance</title>
    <link href="./perf.css" rel="stylesheet" type="text/css">
    <!--[if lte IE 8]><script language="javascript" type="text/javascript" src="./lib/excanvas.min.js"></script><![endif]-->
    <script language="javascript" type="text/javascript" src="./lib/jquery.min.js"></script>
    <script language="javascript" type="text/javascript" src="./lib/jquery.flot.min.js"></script>
    <script language="javascript" type="text/javascript" src="./perf.js"></script>
    <script language="javascript" type="text/javascript">
    $(document).ready(function() {
      var main_results;
        $.ajax({
            url: 'publish-consume-result.js',
            success: function(data) {
                render_graphs(JSON.parse(data));
            },
            fail: function() { alert('error loading publish-consume-result.js'); }
        });
    });
    </script>
 </head>
    <body>
    <h1>RabbitMQ Performance</h1>

    <h3>Consume</h3>
    <div class="chart"
      data-type="time"
      data-latency="true"
      data-x-axis="time (s)"
      data-y-axis="rate (msg/s)"
      data-y-axis2="latency (μs)"
      data-scenario="consume"></div>
  </body>
 </html>

If you need html details, you should look rabbitmq/rabbitmq-perf-html page

create perf spec file

[
    {
        'name': 'consume',
        'type': 'simple',
        'uri': 'amqp://rabbitmq',
        'params': [
            {
                'time-limit': 30,
                'producer-count': 4,
                'consumer-count': 2
            }
        ]
    }
]

If you need spec details, you should look rabbitmq/rabbitmq-perf-html page

Run

RABBIT_PERF_SPEC is set to perf spec file path.
RABBIT_PERF_RESULT is set to perf result file path.
If you use rabbitmq on docker container, you should add --link option.

% docker run -it [--link rabbitmq:rabbitmq] -p 8080:80 \
    -v $PWD/publish-consume-spec.js:/publish-consume-spec.js \
    -v $PWD/index.html:/var/www/html/rabbitmq-perf/index.html \
    -e RABBIT_PERF_SPEC=/publish-consume-spec.js \
    -e RABBIT_PERF_RESULT=/var/www/html/rabbitmq-perf/publish-consume-result.js \
    mahito/rabbitmq-perf-html

Docker-Compose

rabbitperf:
  image: mahito/rabbitmq-perf-html
  container_name: rabbitperf
  hostname: rabbitperf
  links:
    -  rabbitmq:rabbitmq
  ports:
    - "8080:80"
  volumes:
    - ./publish-consume-spec.js:/publish-consume-spec.js
    - ./index.html:/var/www/html/rabbitmq-perf/index.html
  environment:
    - RABBIT_PERF_SPEC=/publish-consume-spec.js
    - RABBIT_PERF_RESULT=/var/www/html/rabbitmq-perf/publish-consume-result.js

View

% open http://localhost:8080/rabbitmq-perf/
Docker Pull Command
Owner
mahito

Comments (0)