poky: reset subtree on master HEAD(a88251b3e7)
As part of the last subtree update, I used master-next as the
subtree basis because there was a fix we needed in order to get QEMU
to pass. I didn't realize that master-next deviated (because they use
to just have short-term patches in it). Reset the content to the same
fix but from the master branch.
Change-Id: Ic7d2f0ac42e9da3eb263586b26ba56d8798d5bcf
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/poky/scripts/lib/build_perf/html/measurement_chart.html b/poky/scripts/lib/build_perf/html/measurement_chart.html
index 9acb378..65f1a22 100644
--- a/poky/scripts/lib/build_perf/html/measurement_chart.html
+++ b/poky/scripts/lib/build_perf/html/measurement_chart.html
@@ -1,76 +1,50 @@
-<script type="module">
- // Get raw data
- const rawData = [
- {% for sample in measurement.samples %}
- [{{ sample.commit_num }}, {{ sample.mean.gv_value() }}, {{ sample.start_time }}],
- {% endfor %}
- ];
+<script type="text/javascript">
+ chartsDrawing += 1;
+ google.charts.setOnLoadCallback(drawChart_{{ chart_elem_id }});
+ function drawChart_{{ chart_elem_id }}() {
+ var data = new google.visualization.DataTable();
- const convertToMinute = (time) => {
- return time[0]*60 + time[1] + time[2]/60 + time[3]/3600;
- }
+ // Chart options
+ var options = {
+ theme : 'material',
+ legend: 'none',
+ hAxis: { format: '', title: 'Commit number',
+ minValue: {{ chart_opts.haxis.min }},
+ maxValue: {{ chart_opts.haxis.max }} },
+ {% if measurement.type == 'time' %}
+ vAxis: { format: 'h:mm:ss' },
+ {% else %}
+ vAxis: { format: '' },
+ {% endif %}
+ pointSize: 5,
+ chartArea: { left: 80, right: 15 },
+ };
- // Convert raw data to the format: [time, value]
- const data = rawData.map(([commit, value, time]) => {
- return [
- // The Date object takes values in milliseconds rather than seconds. So to use a Unix timestamp we have to multiply it by 1000.
- new Date(time * 1000).getTime(),
- // Assuming the array values are duration in the format [hours, minutes, seconds, milliseconds]
- Array.isArray(value) ? convertToMinute(value) : value
- ]
- });
+ // Define data columns
+ data.addColumn('number', 'Commit');
+ data.addColumn('{{ measurement.value_type.gv_data_type }}',
+ '{{ measurement.value_type.quantity }}');
+ // Add data rows
+ data.addRows([
+ {% for sample in measurement.samples %}
+ [{{ sample.commit_num }}, {{ sample.mean.gv_value() }}],
+ {% endfor %}
+ ]);
- // Set chart options
- const option = {
- tooltip: {
- trigger: 'axis',
- valueFormatter: (value) => {
- const hours = Math.floor(value/60)
- const minutes = Math.floor(value % 60)
- const seconds = Math.floor((value * 60) % 60)
- return hours + ':' + minutes + ':' + seconds
- }
- },
- xAxis: {
- type: 'time',
- },
- yAxis: {
- name: '{{ measurement.value_type.quantity }}' == 'time' ? 'Duration in minutes' : 'Disk size in MB',
- type: 'value',
- min: function(value) {
- return Math.round(value.min - 0.5);
- },
- max: function(value) {
- return Math.round(value.max + 0.5);
- }
- },
- dataZoom: [
- {
- type: 'slider',
- xAxisIndex: 0,
- filterMode: 'none'
- },
- ],
- series: [
- {
- name: '{{ measurement.value_type.quantity }}',
- type: 'line',
- smooth: true,
- symbol: 'none',
- data: data
- }
- ]
- };
-
- // Draw chart
- const chart_div = document.getElementById('{{ chart_elem_id }}');
- const measurement_chart= echarts.init(chart_div, null, {
- height: 320
- });
- // Change chart size with browser resize
- window.addEventListener('resize', function() {
- measurement_chart.resize();
- });
- measurement_chart.setOption(option);
+ // Finally, draw the chart
+ chart_div = document.getElementById('{{ chart_elem_id }}');
+ var chart = new google.visualization.LineChart(chart_div);
+ google.visualization.events.addListener(chart, 'ready', function () {
+ //chart_div = document.getElementById('{{ chart_elem_id }}');
+ //chart_div.innerHTML = '<img src="' + chart.getImageURI() + '">';
+ png_div = document.getElementById('{{ chart_elem_id }}_png');
+ png_div.outerHTML = '<a id="{{ chart_elem_id }}_png" href="' + chart.getImageURI() + '">PNG</a>';
+ console.log("CHART READY: {{ chart_elem_id }}");
+ chartsDrawing -= 1;
+ if (chartsDrawing == 0)
+ console.log("ALL CHARTS READY");
+ });
+ chart.draw(data, options);
+}
</script>
diff --git a/poky/scripts/lib/build_perf/html/report.html b/poky/scripts/lib/build_perf/html/report.html
index 4cd2407..d1ba6f2 100644
--- a/poky/scripts/lib/build_perf/html/report.html
+++ b/poky/scripts/lib/build_perf/html/report.html
@@ -3,7 +3,11 @@
<head>
{# Scripts, for visualization#}
<!--START-OF-SCRIPTS-->
-<script src=" https://cdn.jsdelivr.net/npm/echarts@5.5.0/dist/echarts.min.js "></script>
+<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
+<script type="text/javascript">
+google.charts.load('current', {'packages':['corechart']});
+var chartsDrawing = 0;
+</script>
{# Render measurement result charts #}
{% for test in test_data %}
@@ -24,15 +28,23 @@
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: 1.5rem 0;
+ margin-bottom: 10px;
}
.details {
margin: 0;
@@ -52,58 +64,18 @@
background-color: #f0f0f0;
margin-left: 10px;
}
-.card-container {
- border-bottom-width: 1px;
- padding: 1.25rem 3rem;
- box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
- border-radius: 0.25rem;
-}
-body {
- font-family: 'Helvetica', sans-serif;
- margin: 3rem 8rem;
-}
-h1 {
- text-align: center;
+hr {
+ color: #f0f0f0;
}
h2 {
- font-size: 1.5rem;
+ font-size: 20px;
margin-bottom: 0px;
color: #707070;
- padding-top: 1.5rem;
}
h3 {
- font-size: 1.3rem;
+ font-size: 16px;
margin: 0px;
color: #707070;
- padding: 1.5rem 0;
-}
-h4 {
- font-size: 14px;
- font-weight: lighter;
- line-height: 1.2rem;
- margin: auto;
- padding-top: 1rem;
-}
-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;
-}
-a {
- text-decoration: none;
- font-weight: bold;
- color: #0000EE;
-}
-a:hover {
- color: #8080ff;
}
</style>
@@ -111,14 +83,13 @@
</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>
- <h1 style="text-align: center;">Performance Test Report</h1>
+<body><div style="width: 700px">
{# Test metadata #}
<h2>General</h2>
- <h4>The table provides an overview of the comparison between two selected commits from the same branch.</h4>
+ <hr>
<table class="meta-table" style="width: 100%">
<tr>
<th></th>
@@ -141,21 +112,19 @@
{# Test result summary #}
<h2>Test result summary</h2>
- <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>
+ <hr>
<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 }}>
{% if loop.index == 1 %}
- <td><a href=#{{test.name}}>{{ test.name }}: {{ test.description }}</a></td>
+ <td>{{ test.name }}: {{ test.description }}</td>
{% else %}
{# add empty cell in place of the test name#}
<td></td>
@@ -184,12 +153,10 @@
</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 %}
- <h3 style="color: #000;" id={{test.name}}>{{ test.name }}: {{ test.description }}</h3>
+ <h2>{{ test.name }}: {{ test.description }}</h2>
+ <hr>
{% if test.status == 'SUCCESS' %}
- <div class="card-container">
{% for measurement in test.measurements %}
<div class="measurement">
<h3>{{ measurement.description }}</h3>
@@ -308,8 +275,7 @@
{% endif %}
{% endif %}
</div>
- {% endfor %}
- </div>
+ {% endfor %}
{# Unsuccessful test #}
{% else %}
<span style="font-size: 150%; font-weight: bold; color: red;">{{ test.status }}
diff --git a/poky/scripts/lib/build_perf/report.py b/poky/scripts/lib/build_perf/report.py
index 82c5683..ab77424 100644
--- a/poky/scripts/lib/build_perf/report.py
+++ b/poky/scripts/lib/build_perf/report.py
@@ -294,7 +294,7 @@
return "null"
return self / 1024
-def measurement_stats(meas, prefix='', time=0):
+def measurement_stats(meas, prefix=''):
"""Get statistics of a measurement"""
if not meas:
return {prefix + 'sample_cnt': 0,
@@ -319,7 +319,6 @@
stats['quantity'] = val_cls.quantity
stats[prefix + 'sample_cnt'] = len(values)
- start_time = time # Add start time for both type sysres and disk usage
mean_val = val_cls(mean(values))
min_val = val_cls(min(values))
max_val = val_cls(max(values))
@@ -335,7 +334,6 @@
stats[prefix + 'max'] = max_val
stats[prefix + 'minus'] = val_cls(mean_val - min_val)
stats[prefix + 'plus'] = val_cls(max_val - mean_val)
- stats[prefix + 'start_time'] = start_time
return stats
diff --git a/poky/scripts/oe-build-perf-report b/poky/scripts/oe-build-perf-report
index 266700d..7812ea4 100755
--- a/poky/scripts/oe-build-perf-report
+++ b/poky/scripts/oe-build-perf-report
@@ -336,9 +336,7 @@
test_i = test_data['tests'][test]
meas_i = test_i['measurements'][meas]
commit_num = get_data_item(meta, 'layers.meta.commit_count')
- # Add start_time for both test measurement types of sysres and disk usage
- start_time = test_i['start_time'][0]
- samples.append(measurement_stats(meas_i, '', start_time))
+ samples.append(measurement_stats(meas_i))
samples[-1]['commit_num'] = commit_num
absdiff = samples[-1]['val_cls'](samples[-1]['mean'] - samples[id_comp]['mean'])
@@ -475,7 +473,7 @@
group.add_argument('--branch', '-B', default='master', help="Branch to find commit in")
group.add_argument('--branch2', help="Branch to find comparision revisions in")
group.add_argument('--machine', default='qemux86')
- group.add_argument('--history-length', default=300, type=int,
+ group.add_argument('--history-length', default=25, type=int,
help="Number of tested revisions to plot in html report")
group.add_argument('--commit',
help="Revision to search for")
diff --git a/poky/scripts/oe-setup-build b/poky/scripts/oe-setup-build
index c047699..5364f2b 100755
--- a/poky/scripts/oe-setup-build
+++ b/poky/scripts/oe-setup-build
@@ -91,16 +91,7 @@
builddir = args.b if args.b else template["buildpath"]
no_shell = args.no_shell
coredir = os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), '..'))
- cmd_base = ". {} {}".format(os.path.join(coredir, 'oe-init-build-env'), os.path.abspath(builddir))
-
- initbuild = os.path.join(builddir, 'init-build-env')
- if not os.path.exists(initbuild):
- os.makedirs(builddir, exist_ok=True)
- with open(initbuild, 'w') as f:
- f.write(cmd_base)
- print("\nRun '. {}' to initialize the build in a current shell session.\n".format(initbuild))
-
- cmd = "TEMPLATECONF={} {}".format(template["templatepath"], cmd_base)
+ cmd = "TEMPLATECONF={} . {} {}".format(template["templatepath"], os.path.join(coredir, 'oe-init-build-env'), builddir)
if not no_shell:
cmd = cmd + " && {}".format(os.environ['SHELL'])
print("Running:", cmd)