Skip to content

Commit

Permalink
fix: update report page styling and add descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
ninetteadhikari committed Mar 7, 2024
1 parent 69b1752 commit 8926e0a
Showing 1 changed file with 40 additions and 24 deletions.
64 changes: 40 additions & 24 deletions scripts/lib/build_perf/html/report.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{# Scripts, for visualization#}
<!--START-OF-SCRIPTS-->
<script src="https://cdn.jsdelivr.net/npm/d3@^6.1"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/billboard.js@3.10.3/dist/billboard.css">
<link rel="stylesheet" href="https://naver.github.io/billboard.js/release/latest/dist/theme/modern.css">
<script src="https://cdn.jsdelivr.net/npm/billboard.js"></script>

{# Render measurement result charts #}
Expand All @@ -26,23 +26,15 @@
text-align: left;
border-collapse: collapse;
}
.meta-table tr:nth-child(even){background-color: #f2f2f2}
meta-table th, .meta-table td {
padding: 4px;
}
.summary {
margin: 0;
font-size: 14px;
text-align: left;
border-collapse: collapse;
}
summary th, .meta-table td {
padding: 4px;
}
.measurement {
padding: 8px 0px 8px 8px;
border: 2px solid #f0f0f0;
margin-bottom: 10px;
margin: 1.5rem 0;
}
.details {
margin: 0;
Expand All @@ -62,32 +54,54 @@
background-color: #f0f0f0;
margin-left: 10px;
}
hr {
color: #f0f0f0;
body {
font-family: 'Helvetica', sans-serif;
text-align: center;
margin: 3rem 8rem;
}
h2 {
font-size: 20px;
margin-bottom: 0px;
color: #707070;
padding-top: 1.5rem;
}
h3 {
font-size: 16px;
margin: 0px;
color: #707070;
}
h4 {
font-size: 14px;
font-weight: lighter;
line-height: 1.2rem;
}
table {
margin-top: 1.5rem;
line-height: 2rem;
}
tr {
border-bottom: 1px solid #e5e7eb;
}
tr:first-child {
border-bottom: 1px solid #9ca3af;
}
tr:last-child {
border-bottom: none;
}
</style>

<title>{{ title }}</title>
</head>

{% macro poky_link(commit) -%}
<a href="http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/?id={{ commit }}">{{ commit[0:11] }}</a>
<a href="http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/?id={{ commit }}">{{ commit[0:11] }}</a>
{%- endmacro %}

<body><div style="width: 700px">
<body><div>
<h1>Performance Test Report</h1>
{# Test metadata #}
<h2>General</h2>
<hr>
<h4>The table provides an overview of the comparison between two selected commits from the same branch.</h4>
<table class="meta-table" style="width: 100%">
<tr>
<th></th>
Expand All @@ -110,14 +124,16 @@ <h2>General</h2>

{# Test result summary #}
<h2>Test result summary</h2>
<hr>
<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>
<table class="summary" style="width: 100%">
<tr>
<th>Test name</th>
<th>Measurement description</th>
<th>Mean value</th>
<th>Absolute difference</th>
<th>Relative difference</th>
</tr>
{% for test in test_data %}
{% if loop.index is even %}
{% set row_style = 'style="background-color: #f2f2f2"' %}
{% else %}
{% set row_style = 'style="background-color: #ffffff"' %}
{% endif %}
{% if test.status == 'SUCCESS' %}
{% for measurement in test.measurements %}
<tr {{ row_style }}>
Expand Down Expand Up @@ -151,9 +167,10 @@ <h2>Test result summary</h2>
</table>

{# Detailed test results #}
<h2>Test details</h2>
<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>
{% for test in test_data %}
<h2>{{ test.name }}: {{ test.description }}</h2>
<hr>
<h3>{{ test.name }}: {{ test.description }}</h3>
{% if test.status == 'SUCCESS' %}
{% for measurement in test.measurements %}
<div class="measurement">
Expand Down Expand Up @@ -284,4 +301,3 @@ <h3>{{ measurement.description }}</h3>
{% endfor %}
</div></body>
</html>

0 comments on commit 8926e0a

Please sign in to comment.