~juju-qa/juju-ci-tools/trunk

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <link rel="stylesheet" type="text/css"
      href="http://assets.ubuntu.com/sites/guidelines/css/latest/ubuntu-styles.css" />
    <link rel="stylesheet" type="text/css"
      href="http://fonts.googleapis.com/css?family=Ubuntu:400,300,300italic,400italic,700,700italic|Ubuntu+Mono" />
    <link rel="stylesheet" type="text/css"
      href="http://reports.vapour.ws/static/css/base.css" />
    <link rel="shortcut icon"  type="image/png"
      href="http://reports.vapour.ws/static/images/favicon.ico" />
    <!-- Additional styles for 'tabs' and overwrite for table. -->
    <style type="text/css" media="screen">
        ul.tabs {
            list-style: none;
            border: 0;
            margin: 0;
            margin-left: 20px;
            margin-bottom: 20px;
            margin-top: 8px;
            padding: 0;
            vertical-align: 0;
            display: inline-block;
        }

        ul.tabs li {
            background: none;
            display: inline-block;
            cursor: pointer;
        }

        ul.tabs li span.tab {
            color: #888;
        }

        ul.tabs li.current span.tab {
            border-bottom: 3px solid #dd4814;
        }

        ul.tabs li::after {
            content: '';
            width: 1px;
            display: inline-block;
            background: #d2d2d2;
            height: 11px;
            padding: 0;
            margin: 0 5px;
        }

        ul.tabs li:last-child::after {
            display: none;
        }

        .tab-content {
            display: none;
            background: #ededed;
        }

        .tab-content.current {
            display: inherit;
        }

        table.log-report {
            table-layout: fixed;
        }

        table.log-report tr {
            cursor: pointer;
        }

        table.log-report td {
            text-align: left;
            word-wrap: break-word;
            overflow-wrap: break-word;
        }

        table .unit-details {
            text-align: left;
        }

        table.log-report tr.displayNone {
            display: none;
        }

        table.log-report tr.log-header.hidden > td::before {
            content: " \25ba ";
        }

        table.log-report tr.displayRow {
            display: block;
        }

        table.log-report tr.log-header.shown > td::before {
            content: " \25bc ";
        }
    </style>
    <!-- jquery 1.11.3 -->
    <script src="https://assets.ubuntu.com/v1/37b1db88-jquery.min.js"></script>

    <!-- Quick glue code for 'tabs' -->
    <script type="text/javascript">
      $(document).ready(function(){
	      $('ul.tabs li').click(function(){
		    var tab_id = $(this).attr('data-tab');

    		$('ul.tabs li').removeClass('current');
    		$('.tab-content').removeClass('current');

    		$(this).addClass('current');
    		$("#"+tab_id).addClass('current');
          });

          $('table tr.log-header').click(function(){
              $(this).toggleClass('hidden shown');
              $(this).nextUntil('table tr.log-header').slideToggle('normal',
                  function() { $(this).toggleClass('displayNone displayRow')});
              });
      });

    </script>

    <title>Simple performance/scale reporting</title>

  </head>
  <body>
    <header class="banner global" role="banner">
      <nav role="navigation" class="nav-primary nav-right">
        <div class="logo">
          <a class="logo-ubuntu" href="/">
            <img width="118" height="27" src="https://assets.ubuntu.com/sites/ubuntu/latest/u/img/logo.png" alt="Juju Logo" />
            <span>juju reports</span>
          </a>
        </div>
      </nav>
    </header>

    <div class="wrapper">
      <div id="main-content" class="inner-wrapper">
        <div class="row no-border">
          <h1>Performance &amp; Scale testing</h1>

          <h2>Action Timings</h2>

          <blockquote>
            Breakdown of start and end times of an action (i.e. either
            bootstrapping or deploying a charm).
          </blockquote>

          <table>
            <tr>
              <th>Action</th>
              <th>Start</th>
              <th>End</th>
              <th>Duration</th>
            </tr>
            <tr>
              <td>Bootstrap</td>
              <td>{{deployments.bootstrap.start}}</td>
              <td>{{deployments.bootstrap.end}}</td>
              <td>{{deployments.bootstrap.seconds}} Seconds</td>
            </tr>
            {% for deploy in deployments.deploys %}
            <tr>
              <td>Deploy {{deploy.name}}</td>
              <td>{{deploy.timings.start}}</td>
              <td>{{deploy.timings.end}}</td>
              <td>{{deploy.timings.seconds}} Seconds</td>
            </tr>
            <tr>
              <td colspan=4>
                <div class="unit-details">Units</div>
                <ul class="unit-details">
                  {% for name in deploy.applications.keys() %}
                  <li><b>{{name}}:</b> {{deploy.applications[name]}}</li>
                  {% endfor %}
                </ul>
              </td>
            </tr>
            {% endfor %}
            <tr>
              <td>Kill Controller</td>
              <td>{{deployments.cleanup.start}}</td>
              <td>{{deployments.cleanup.end}}</td>
              <td>{{deployments.cleanup.seconds}} Seconds</td>
            </tr>
          </table>

          <h1>Controller system metrics</h1>

          <blockquote>
            System metrics are collected on the api-server(s) during the deployment
            of charms. No metrics are collected during the bootstrap process.
          </blockquote>

          <h2>CPU Usage</h2>
          <img src="{{cpu_graph}}" alt="CPU Usage Graph" />

          <h2>Memory Usage</h2>
          <img src="{{memory_graph}}" alt="Memory Usage Graph" />

          <h2>Network Usage</h2>
          <img src="{{network_graph}}" alt="Network Usage Graph" />

          {% if mongo_graph is not none %}
          <h2>MongoDB Action Statistics</h2>
          <img src="{{mongo_graph}}" alt="MongoDB Actions Details Graph" />
          {% endif %}

          {% if mongo_memory_graph is not none %}
          <h2>MongoDB Memory Usage Statistics</h2>
          <img src="{{mongo_memory_graph}}" alt="MongoDB Memory Usage Details Graph" />
          {% endif %}

          <h1>Log Breakdown</h1>
          <blockquote>
            Logs broken down into 20 second chunks (to match the graphs.)
          </blockquote>

          <ul class="tabs">
            {% for date_stamp, values in log_message_chunks|dictsort %}
            {% set safe_date_stamp = date_stamp|replace(":", "")|replace(" ", "") %}
            <li
               class="tab-link {% if loop.index == 1 %} current {% endif %}"
               data-tab="{{safe_date_stamp}}"
               >
              <span class="tab" >{{values.name}}</span>
            </li>
            {% endfor %}
          </ul>

          {% for date_stamp, values in log_message_chunks|dictsort %}
          {% set safe_date_stamp = date_stamp|replace(":", "")|replace(" ", "")|replace("(", "")|replace(")", "") %}
          <div
             class="tab-content {% if loop.index == 1 %} current {% endif %}"
             id="{{safe_date_stamp}}">
            <h4 class="text-center">Log for: {{values.name}}</h4>
            <div class="text-center">Log period: <b>{{date_stamp}}</b></div>
            <table class="log-report">
              {% for log_detail in values.logs|sort(attribute='timeframe') %}
              {% set safe_timeframe = log_detail.timeframe|replace(":", "")|replace(" ", "")|replace("(", "")|replace(")", "") %}
              <tr class="log-header hidden">
                <td>
                  <a name="top_{{safe_timeframe}}"></a>
                  {{log_detail.timeframe}}
                </td>
              </tr>
              <tr class="displayNone">
                <td>
                  <div id="{{safe_timeframe}}" class="collapse">
                    <small>
                      {{log_detail.message}}
                      <div class="text-center">
                        <a href="#top_{{safe_timeframe}}">Back to log top</a>
                      </div>
                    </small>
                  </div>
                </td>
              </tr>
              {%endfor%}

            </table>
          </div>
          {% endfor %}

        </div>
      </div>
    </div>
    <footer class="global clearfix">
      <div class="legal clearfix">
        <p class="twelve-col">
          &copy; 2016 Canonical Ltd. Ubuntu and Canonical are registered
          trademarks of Canonical Ltd.
        </p>
      </div>
    </footer>
  </body>
</html>