From: Alex Feyerke <[email protected]>
Signed-off-by: Alex Feyerke <[email protected]>
---
scripts/lib/build_perf/html/report.html | 20 ++++++++++++++++++--
scripts/oe-build-perf-report | 13 -------------
2 files changed, 18 insertions(+), 15 deletions(-)
diff --git a/scripts/lib/build_perf/html/report.html
b/scripts/lib/build_perf/html/report.html
index 4b37893cd0..779aa55573 100644
--- a/scripts/lib/build_perf/html/report.html
+++ b/scripts/lib/build_perf/html/report.html
@@ -140,6 +140,11 @@ button:hover {
max-width: 30em;
text-wrap: auto;
}
+
+.annotation-container:not(:empty) {
+ display: inline-block;
+}
+
@media (prefers-color-scheme: dark) {
:root {
--text: #e9e8fa;
@@ -198,8 +203,8 @@ button:hover {
<tr>
<th>{{ item.title }}</th>
{%if key == 'commit' %}
- <td>{{ poky_link(item.value) }}{%if metadata.commit_annotation and
metadata.commit_annotation.value %}<br>{{metadata.commit_annotation.value}}{%
endif %}</td>
- <td>{{ poky_link(item.value_old) }}{%if metadata.commit_annotation
and metadata.commit_annotation.value
%}<br>{{metadata.commit_annotation.value_old}}{% endif %}</td>
+ <td>{{ poky_link(item.value) }}<span class="annotation-container"
data-commit="{{ item.value }}"></span></td>
+ <td>{{ poky_link(item.value_old) }}<span
class="annotation-container" data-commit="{{ item.value_old }}"></span></td>
{% elif key == 'commit_annotation' %}
{% else %}
<td>{{ item.value }}</td>
@@ -529,6 +534,17 @@ chartData.forEach(test => {
drawChart(measurement.chart_elem_start_time_id, startTimeChartConfig)
drawChart(measurement.chart_elem_commit_count_id, commitCountChartConfig)
})
+
+ // Splice commit annotations into the table at the top of the page
+ if (commitAnnotations) {
+ document.querySelectorAll("[data-commit]").forEach((item) => {
+ const commitNumber = item.getAttribute("data-commit")
+ const matchingAnnotation = commitAnnotations[commitNumber]
+ if (matchingAnnotation) {
+ item.innerText = matchingAnnotation
+ }
+ })
+ }
})
diff --git a/scripts/oe-build-perf-report b/scripts/oe-build-perf-report
index f9bdef2712..02da745a6c 100755
--- a/scripts/oe-build-perf-report
+++ b/scripts/oe-build-perf-report
@@ -432,19 +432,6 @@ def print_html_report(data, id_comp, buildstats):
try:
response = urlopen(commitAnnotationsURL)
commitAnnotationsJSON = json.loads(response.read())
- # Splice the annotations into the metadata
- commit = metadata.get('commit', {})
- annotations_out = {}
-
- if (h := commit.get('value')) in commitAnnotationsJSON:
- annotations_out['value'] = commitAnnotationsJSON[h]
-
- if (h := commit.get('value_old')) in commitAnnotationsJSON:
- annotations_out['value_old'] = commitAnnotationsJSON[h]
-
- if annotations_out:
- metadata['commit_annotation'] = annotations_out
- metadata['commit_annotation']['title'] = "Commit annotation"
except error.URLError as e:
logging.debug(f"Couldn't find any commit annotations at
{commitAnnotationsURL}, reason: {e.reason}.")
--
2.40.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#231036):
https://lists.openembedded.org/g/openembedded-core/message/231036
Mute This Topic: https://lists.openembedded.org/mt/117775944/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-