Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <html lang="en"> |
| 3 | <head> |
| 4 | {# Scripts, for visualization#} |
| 5 | <!--START-OF-SCRIPTS--> |
| 6 | <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> |
| 7 | <script type="text/javascript"> |
| 8 | google.charts.load('current', {'packages':['corechart']}); |
| 9 | var chartsDrawing = 0; |
| 10 | </script> |
| 11 | |
| 12 | {# Render measurement result charts #} |
| 13 | {% for test in test_data %} |
| 14 | {% if test.status == 'SUCCESS' %} |
| 15 | {% for measurement in test.measurements %} |
| 16 | {% set chart_elem_id = test.name + '_' + measurement.name + '_chart' %} |
| 17 | {% include 'measurement_chart.html' %} |
| 18 | {% endfor %} |
| 19 | {% endif %} |
| 20 | {% endfor %} |
| 21 | |
| 22 | <!--END-OF-SCRIPTS--> |
| 23 | |
| 24 | {# Styles #} |
| 25 | <style> |
| 26 | .meta-table { |
| 27 | font-size: 14px; |
| 28 | text-align: left; |
| 29 | border-collapse: collapse; |
| 30 | } |
| 31 | .meta-table tr:nth-child(even){background-color: #f2f2f2} |
| 32 | meta-table th, .meta-table td { |
| 33 | padding: 4px; |
| 34 | } |
| 35 | .summary { |
| 36 | margin: 0; |
| 37 | font-size: 14px; |
| 38 | text-align: left; |
| 39 | border-collapse: collapse; |
| 40 | } |
| 41 | summary th, .meta-table td { |
| 42 | padding: 4px; |
| 43 | } |
| 44 | .measurement { |
| 45 | padding: 8px 0px 8px 8px; |
| 46 | border: 2px solid #f0f0f0; |
| 47 | margin-bottom: 10px; |
| 48 | } |
| 49 | .details { |
| 50 | margin: 0; |
| 51 | font-size: 12px; |
| 52 | text-align: left; |
| 53 | border-collapse: collapse; |
| 54 | } |
| 55 | .details th { |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 56 | padding-right: 8px; |
| 57 | } |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 58 | .details.plain th { |
| 59 | font-weight: normal; |
| 60 | } |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 61 | .preformatted { |
| 62 | font-family: monospace; |
| 63 | white-space: pre-wrap; |
| 64 | background-color: #f0f0f0; |
| 65 | margin-left: 10px; |
| 66 | } |
| 67 | hr { |
| 68 | color: #f0f0f0; |
| 69 | } |
| 70 | h2 { |
| 71 | font-size: 20px; |
| 72 | margin-bottom: 0px; |
| 73 | color: #707070; |
| 74 | } |
| 75 | h3 { |
| 76 | font-size: 16px; |
| 77 | margin: 0px; |
| 78 | color: #707070; |
| 79 | } |
| 80 | </style> |
| 81 | |
| 82 | <title>{{ title }}</title> |
| 83 | </head> |
| 84 | |
| 85 | {% macro poky_link(commit) -%} |
| 86 | <a href="http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/?id={{ commit }}">{{ commit[0:11] }}</a> |
| 87 | {%- endmacro %} |
| 88 | |
| 89 | <body><div style="width: 700px"> |
| 90 | {# Test metadata #} |
| 91 | <h2>General</h2> |
| 92 | <hr> |
| 93 | <table class="meta-table" style="width: 100%"> |
| 94 | <tr> |
| 95 | <th></th> |
| 96 | <th>Current commit</th> |
| 97 | <th>Comparing with</th> |
| 98 | </tr> |
| 99 | {% for key, item in metadata.items() %} |
| 100 | <tr> |
| 101 | <th>{{ item.title }}</th> |
| 102 | {%if key == 'commit' %} |
| 103 | <td>{{ poky_link(item.value) }}</td> |
| 104 | <td>{{ poky_link(item.value_old) }}</td> |
| 105 | {% else %} |
| 106 | <td>{{ item.value }}</td> |
| 107 | <td>{{ item.value_old }}</td> |
| 108 | {% endif %} |
| 109 | </tr> |
| 110 | {% endfor %} |
| 111 | </table> |
| 112 | |
| 113 | {# Test result summary #} |
| 114 | <h2>Test result summary</h2> |
| 115 | <hr> |
| 116 | <table class="summary" style="width: 100%"> |
| 117 | {% for test in test_data %} |
| 118 | {% if loop.index is even %} |
| 119 | {% set row_style = 'style="background-color: #f2f2f2"' %} |
| 120 | {% else %} |
| 121 | {% set row_style = 'style="background-color: #ffffff"' %} |
| 122 | {% endif %} |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 123 | {% if test.status == 'SUCCESS' %} |
| 124 | {% for measurement in test.measurements %} |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 125 | <tr {{ row_style }}> |
| 126 | {% if loop.index == 1 %} |
| 127 | <td>{{ test.name }}: {{ test.description }}</td> |
| 128 | {% else %} |
| 129 | {# add empty cell in place of the test name#} |
| 130 | <td></td> |
| 131 | {% endif %} |
| 132 | {% if measurement.absdiff > 0 %} |
| 133 | {% set result_style = "color: red" %} |
| 134 | {% elif measurement.absdiff == measurement.absdiff %} |
| 135 | {% set result_style = "color: green" %} |
| 136 | {% else %} |
| 137 | {% set result_style = "color: orange" %} |
| 138 | {%endif %} |
| 139 | <td>{{ measurement.description }}</td> |
| 140 | <td style="font-weight: bold">{{ measurement.value.mean }}</td> |
| 141 | <td style="{{ result_style }}">{{ measurement.absdiff_str }}</td> |
| 142 | <td style="{{ result_style }}">{{ measurement.reldiff }}</td> |
| 143 | </tr> |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 144 | {% endfor %} |
| 145 | {% else %} |
| 146 | <td style="font-weight: bold; color: red;">{{test.status }}</td> |
| 147 | <td></td> <td></td> <td></td> <td></td> |
| 148 | {% endif %} |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 149 | {% endfor %} |
| 150 | </table> |
| 151 | |
| 152 | {# Detailed test results #} |
| 153 | {% for test in test_data %} |
| 154 | <h2>{{ test.name }}: {{ test.description }}</h2> |
| 155 | <hr> |
| 156 | {% if test.status == 'SUCCESS' %} |
| 157 | {% for measurement in test.measurements %} |
| 158 | <div class="measurement"> |
| 159 | <h3>{{ measurement.description }}</h3> |
| 160 | <div style="font-weight:bold;"> |
| 161 | <span style="font-size: 23px;">{{ measurement.value.mean }}</span> |
| 162 | <span style="font-size: 20px; margin-left: 12px"> |
| 163 | {% if measurement.absdiff > 0 %} |
| 164 | <span style="color: red"> |
| 165 | {% elif measurement.absdiff == measurement.absdiff %} |
| 166 | <span style="color: green"> |
| 167 | {% else %} |
| 168 | <span style="color: orange"> |
| 169 | {% endif %} |
| 170 | {{ measurement.absdiff_str }} ({{measurement.reldiff}}) |
| 171 | </span></span> |
| 172 | </div> |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 173 | {# Table for trendchart and the statistics #} |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 174 | <table style="width: 100%"> |
| 175 | <tr> |
| 176 | <td style="width: 75%"> |
| 177 | {# Linechart #} |
| 178 | <div id="{{ test.name }}_{{ measurement.name }}_chart"></div> |
| 179 | </td> |
| 180 | <td> |
| 181 | {# Measurement statistics #} |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 182 | <table class="details plain"> |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 183 | <tr> |
| 184 | <th>Test runs</th><td>{{ measurement.value.sample_cnt }}</td> |
| 185 | </tr><tr> |
| 186 | <th>-/+</th><td>-{{ measurement.value.minus }} / +{{ measurement.value.plus }}</td> |
| 187 | </tr><tr> |
| 188 | <th>Min</th><td>{{ measurement.value.min }}</td> |
| 189 | </tr><tr> |
| 190 | <th>Max</th><td>{{ measurement.value.max }}</td> |
| 191 | </tr><tr> |
| 192 | <th>Stdev</th><td>{{ measurement.value.stdev }}</td> |
| 193 | </tr><tr> |
| 194 | <th><div id="{{ test.name }}_{{ measurement.name }}_chart_png"></div></th> |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 195 | <td></td> |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 196 | </tr> |
| 197 | </table> |
| 198 | </td> |
| 199 | </tr> |
| 200 | </table> |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 201 | |
| 202 | {# Task and recipe summary from buildstats #} |
| 203 | {% if 'buildstats' in measurement %} |
| 204 | Task resource usage |
| 205 | <table class="details" style="width:100%"> |
| 206 | <tr> |
| 207 | <th>Number of tasks</th> |
| 208 | <th>Top consumers of cputime</th> |
| 209 | </tr> |
| 210 | <tr> |
| 211 | <td style="vertical-align: top">{{ measurement.buildstats.tasks.count }} ({{ measurement.buildstats.tasks.change }})</td> |
| 212 | {# Table of most resource-hungry tasks #} |
| 213 | <td> |
| 214 | <table class="details plain"> |
| 215 | {% for diff in measurement.buildstats.top_consumer|reverse %} |
| 216 | <tr> |
| 217 | <th>{{ diff.pkg }}.{{ diff.task }}</th> |
| 218 | <td>{{ '%0.0f' % diff.value2 }} s</td> |
| 219 | </tr> |
| 220 | {% endfor %} |
| 221 | </table> |
| 222 | </td> |
| 223 | </tr> |
| 224 | <tr> |
| 225 | <th>Biggest increase in cputime</th> |
| 226 | <th>Biggest decrease in cputime</th> |
| 227 | </tr> |
| 228 | <tr> |
| 229 | {# Table biggest increase in resource usage #} |
| 230 | <td> |
| 231 | <table class="details plain"> |
| 232 | {% for diff in measurement.buildstats.top_increase|reverse %} |
| 233 | <tr> |
| 234 | <th>{{ diff.pkg }}.{{ diff.task }}</th> |
| 235 | <td>{{ '%+0.0f' % diff.absdiff }} s</td> |
| 236 | </tr> |
| 237 | {% endfor %} |
| 238 | </table> |
| 239 | </td> |
| 240 | {# Table biggest decrease in resource usage #} |
| 241 | <td> |
| 242 | <table class="details plain"> |
| 243 | {% for diff in measurement.buildstats.top_decrease %} |
| 244 | <tr> |
| 245 | <th>{{ diff.pkg }}.{{ diff.task }}</th> |
| 246 | <td>{{ '%+0.0f' % diff.absdiff }} s</td> |
| 247 | </tr> |
| 248 | {% endfor %} |
| 249 | </table> |
| 250 | </td> |
| 251 | </tr> |
| 252 | </table> |
| 253 | |
| 254 | {# Recipe version differences #} |
| 255 | {% if measurement.buildstats.ver_diff %} |
| 256 | <div style="margin-top: 16px">Recipe version changes</div> |
| 257 | <table class="details"> |
| 258 | {% for head, recipes in measurement.buildstats.ver_diff.items() %} |
| 259 | <tr> |
| 260 | <th colspan="2">{{ head }}</th> |
| 261 | </tr> |
| 262 | {% for name, info in recipes|sort %} |
| 263 | <tr> |
| 264 | <td>{{ name }}</td> |
| 265 | <td>{{ info }}</td> |
| 266 | </tr> |
| 267 | {% endfor %} |
| 268 | {% endfor %} |
| 269 | </table> |
| 270 | {% else %} |
| 271 | <div style="margin-top: 16px">No recipe version changes detected</div> |
| 272 | {% endif %} |
| 273 | {% endif %} |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 274 | </div> |
| 275 | {% endfor %} |
| 276 | {# Unsuccessful test #} |
| 277 | {% else %} |
| 278 | <span style="font-size: 150%; font-weight: bold; color: red;">{{ test.status }} |
| 279 | {% if test.err_type %}<span style="font-size: 75%; font-weight: normal">({{ test.err_type }})</span>{% endif %} |
| 280 | </span> |
| 281 | <div class="preformatted">{{ test.message }}</div> |
| 282 | {% endif %} |
| 283 | {% endfor %} |
| 284 | </div></body> |
| 285 | </html> |
| 286 | |