1<!DOCTYPE html> 2<html lang="en"> 3<head> 4{# Scripts, for visualization#} 5<!--START-OF-SCRIPTS--> 6<script src=" https://cdn.jsdelivr.net/npm/echarts@5.5.0/dist/echarts.min.js "></script> 7 8{# Render measurement result charts #} 9{% for test in test_data %} 10 {% if test.status == 'SUCCESS' %} 11 {% for measurement in test.measurements %} 12 {% set chart_elem_id = test.name + '_' + measurement.name + '_chart' %} 13 {% include 'measurement_chart.html' %} 14 {% endfor %} 15 {% endif %} 16{% endfor %} 17 18<!--END-OF-SCRIPTS--> 19 20{# Styles #} 21<style> 22:root { 23 --text: #000; 24 --bg: #fff; 25 --h2heading: #707070; 26 --link: #0000EE; 27 --trtopborder: #9ca3af; 28 --trborder: #e5e7eb; 29 --chartborder: #f0f0f0; 30 } 31.meta-table { 32 font-size: 14px; 33 text-align: left; 34 border-collapse: collapse; 35} 36.summary { 37 font-size: 14px; 38 text-align: left; 39 border-collapse: collapse; 40} 41.measurement { 42 padding: 8px 0px 8px 8px; 43 border: 2px solid var(--chartborder); 44 margin: 1.5rem 0; 45} 46.details { 47 margin: 0; 48 font-size: 12px; 49 text-align: left; 50 border-collapse: collapse; 51} 52.details th { 53 padding-right: 8px; 54} 55.details.plain th { 56 font-weight: normal; 57} 58.preformatted { 59 font-family: monospace; 60 white-space: pre-wrap; 61 background-color: #f0f0f0; 62 margin-left: 10px; 63} 64.card-container { 65 border-bottom-width: 1px; 66 padding: 1.25rem 3rem; 67 box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); 68 border-radius: 0.25rem; 69} 70body { 71 font-family: 'Helvetica', sans-serif; 72 margin: 3rem 8rem; 73 background-color: var(--bg); 74 color: var(--text); 75} 76h1 { 77 text-align: center; 78} 79h2 { 80 font-size: 1.5rem; 81 margin-bottom: 0px; 82 color: var(--h2heading); 83 padding-top: 1.5rem; 84} 85h3 { 86 font-size: 1.3rem; 87 margin: 0px; 88 color: var(--h2heading); 89 padding: 1.5rem 0; 90} 91h4 { 92 font-size: 14px; 93 font-weight: lighter; 94 line-height: 1.2rem; 95 margin: auto; 96 padding-top: 1rem; 97} 98table { 99 margin-top: 1.5rem; 100 line-height: 2rem; 101} 102tr { 103 border-bottom: 1px solid var(--trborder); 104} 105tr:first-child { 106 border-bottom: 1px solid var(--trtopborder); 107} 108tr:last-child { 109 border-bottom: none; 110} 111a { 112 text-decoration: none; 113 font-weight: bold; 114 color: var(--link); 115} 116a:hover { 117 color: #8080ff; 118} 119@media (prefers-color-scheme: dark) { 120 :root { 121 --text: #e9e8fa; 122 --bg: #0F0C28; 123 --h2heading: #B8B7CB; 124 --link: #87cefa; 125 --trtopborder: #394150; 126 --trborder: #212936; 127 --chartborder: #b1b0bf; 128 } 129} 130</style> 131 132<title>{{ title }}</title> 133</head> 134 135{% macro poky_link(commit) -%} 136 <a href="http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/?id={{ commit }}">{{ commit[0:11] }}</a> 137{%- endmacro %} 138 139<body><div> 140 <h1 style="text-align: center;">Performance Test Report</h1> 141 {# Test metadata #} 142 <h2>General</h2> 143 <h4>The table provides an overview of the comparison between two selected commits from the same branch.</h4> 144 <table class="meta-table" style="width: 100%"> 145 <tr> 146 <th></th> 147 <th>Current commit</th> 148 <th>Comparing with</th> 149 </tr> 150 {% for key, item in metadata.items() %} 151 <tr> 152 <th>{{ item.title }}</th> 153 {%if key == 'commit' %} 154 <td>{{ poky_link(item.value) }}</td> 155 <td>{{ poky_link(item.value_old) }}</td> 156 {% else %} 157 <td>{{ item.value }}</td> 158 <td>{{ item.value_old }}</td> 159 {% endif %} 160 </tr> 161 {% endfor %} 162 </table> 163 164 {# Test result summary #} 165 <h2>Test result summary</h2> 166 <h4>The test summary presents a thorough breakdown of each test conducted on the branch, including details such as build time and disk space consumption. Additionally, it gives insights into the average time taken for test execution, along with absolute and relative values for a better understanding.</h4> 167 <table class="summary" style="width: 100%"> 168 <tr> 169 <th>Test name</th> 170 <th>Measurement description</th> 171 <th>Mean value</th> 172 <th>Absolute difference</th> 173 <th>Relative difference</th> 174 </tr> 175 {% for test in test_data %} 176 {% if test.status == 'SUCCESS' %} 177 {% for measurement in test.measurements %} 178 <tr {{ row_style }}> 179 {% if loop.index == 1 %} 180 <td><a href=#{{test.name}}>{{ test.name }}: {{ test.description }}</a></td> 181 {% else %} 182 {# add empty cell in place of the test name#} 183 <td></td> 184 {% endif %} 185 {% if measurement.absdiff > 0 %} 186 {% set result_style = "color: red" %} 187 {% elif measurement.absdiff == measurement.absdiff %} 188 {% set result_style = "color: green" %} 189 {% else %} 190 {% set result_style = "color: orange" %} 191 {%endif %} 192 {% if measurement.reldiff|abs > 2 %} 193 {% set result_style = result_style + "; font-weight: bold" %} 194 {% endif %} 195 <td>{{ measurement.description }}</td> 196 <td style="font-weight: bold">{{ measurement.value.mean }}</td> 197 <td style="{{ result_style }}">{{ measurement.absdiff_str }}</td> 198 <td style="{{ result_style }}">{{ measurement.reldiff_str }}</td> 199 </tr> 200 {% endfor %} 201 {% else %} 202 <td style="font-weight: bold; color: red;">{{test.status }}</td> 203 <td></td> <td></td> <td></td> <td></td> 204 {% endif %} 205 {% endfor %} 206 </table> 207 208 {# Detailed test results #} 209 <h2>Test details</h2> 210 <h4>The following section provides details of each test, accompanied by charts representing build time and disk usage over time or by commit number.</h4> 211 {% for test in test_data %} 212 <h3 style="color: #000;" id={{test.name}}>{{ test.name }}: {{ test.description }}</h3> 213 {% if test.status == 'SUCCESS' %} 214 <div class="card-container"> 215 {% for measurement in test.measurements %} 216 <div class="measurement"> 217 <h3>{{ measurement.description }}</h3> 218 <div style="font-weight:bold;"> 219 <span style="font-size: 23px;">{{ measurement.value.mean }}</span> 220 <span style="font-size: 20px; margin-left: 12px"> 221 {% if measurement.absdiff > 0 %} 222 <span style="color: red"> 223 {% elif measurement.absdiff == measurement.absdiff %} 224 <span style="color: green"> 225 {% else %} 226 <span style="color: orange"> 227 {% endif %} 228 {{ measurement.absdiff_str }} ({{measurement.reldiff_str}}) 229 </span></span> 230 </div> 231 {# Table for trendchart and the statistics #} 232 <table style="width: 100%"> 233 <tr> 234 <td style="width: 75%"> 235 {# Linechart #} 236 <div id="{{ test.name }}_{{ measurement.name }}_chart"></div> 237 </td> 238 <td> 239 {# Measurement statistics #} 240 <table class="details plain"> 241 <tr> 242 <th>Test runs</th><td>{{ measurement.value.sample_cnt }}</td> 243 </tr><tr> 244 <th>-/+</th><td>-{{ measurement.value.minus }} / +{{ measurement.value.plus }}</td> 245 </tr><tr> 246 <th>Min</th><td>{{ measurement.value.min }}</td> 247 </tr><tr> 248 <th>Max</th><td>{{ measurement.value.max }}</td> 249 </tr><tr> 250 <th>Stdev</th><td>{{ measurement.value.stdev }}</td> 251 </tr><tr> 252 <th><div id="{{ test.name }}_{{ measurement.name }}_chart_png"></div></th> 253 <td></td> 254 </tr> 255 </table> 256 </td> 257 </tr> 258 </table> 259 260 {# Task and recipe summary from buildstats #} 261 {% if 'buildstats' in measurement %} 262 Task resource usage 263 <table class="details" style="width:100%"> 264 <tr> 265 <th>Number of tasks</th> 266 <th>Top consumers of cputime</th> 267 </tr> 268 <tr> 269 <td style="vertical-align: top">{{ measurement.buildstats.tasks.count }} ({{ measurement.buildstats.tasks.change }})</td> 270 {# Table of most resource-hungry tasks #} 271 <td> 272 <table class="details plain"> 273 {% for diff in measurement.buildstats.top_consumer|reverse %} 274 <tr> 275 <th>{{ diff.pkg }}.{{ diff.task }}</th> 276 <td>{{ '%0.0f' % diff.value2 }} s</td> 277 </tr> 278 {% endfor %} 279 </table> 280 </td> 281 </tr> 282 <tr> 283 <th>Biggest increase in cputime</th> 284 <th>Biggest decrease in cputime</th> 285 </tr> 286 <tr> 287 {# Table biggest increase in resource usage #} 288 <td> 289 <table class="details plain"> 290 {% for diff in measurement.buildstats.top_increase|reverse %} 291 <tr> 292 <th>{{ diff.pkg }}.{{ diff.task }}</th> 293 <td>{{ '%+0.0f' % diff.absdiff }} s</td> 294 </tr> 295 {% endfor %} 296 </table> 297 </td> 298 {# Table biggest decrease in resource usage #} 299 <td> 300 <table class="details plain"> 301 {% for diff in measurement.buildstats.top_decrease %} 302 <tr> 303 <th>{{ diff.pkg }}.{{ diff.task }}</th> 304 <td>{{ '%+0.0f' % diff.absdiff }} s</td> 305 </tr> 306 {% endfor %} 307 </table> 308 </td> 309 </tr> 310 </table> 311 312 {# Recipe version differences #} 313 {% if measurement.buildstats.ver_diff %} 314 <div style="margin-top: 16px">Recipe version changes</div> 315 <table class="details"> 316 {% for head, recipes in measurement.buildstats.ver_diff.items() %} 317 <tr> 318 <th colspan="2">{{ head }}</th> 319 </tr> 320 {% for name, info in recipes|sort %} 321 <tr> 322 <td>{{ name }}</td> 323 <td>{{ info }}</td> 324 </tr> 325 {% endfor %} 326 {% endfor %} 327 </table> 328 {% else %} 329 <div style="margin-top: 16px">No recipe version changes detected</div> 330 {% endif %} 331 {% endif %} 332 </div> 333 {% endfor %} 334 </div> 335 {# Unsuccessful test #} 336 {% else %} 337 <span style="font-size: 150%; font-weight: bold; color: red;">{{ test.status }} 338 {% if test.err_type %}<span style="font-size: 75%; font-weight: normal">({{ test.err_type }})</span>{% endif %} 339 </span> 340 <div class="preformatted">{{ test.message }}</div> 341 {% endif %} 342 {% endfor %} 343</div></body> 344</html> 345 346