Commit Graph

32 Commits

Author SHA1 Message Date
Richard Purdie
a24b178666 oe-build-perf-report: Use commit_time if available
Currently, the perf report charts use start_time which is when the build
is run. If running builds for commits in the past, this is inaccurate so
switch to using the recently added commit_time if the field is present.
Over time, the reports will switch to using the more accurate values.

(From OE-Core rev: 8c22efd444b0b1486c43f01b41cba891a47c7520)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-02-11 11:44:19 +00:00
Ninette Adhikari
f66f8fa9f6 oe-build-perf-report: Add commit hash link to chart tooltip
Update tooltip to include the commit hash link to the poky repository

(From OE-Core rev: 1187a460c2608369df8de08fe52a5542e4ab6ecd)

Signed-off-by: Ninette Adhikari <ninette@thehoodiefirm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-24 16:59:31 +01:00
Ninette Adhikari
99861c17e7 oe-build-perf-report: Display more than 300 commits and date instead of commit number
- This commit updates measurement statistics data to include start_time so that time can be displayed instead of commit numbers on the chart.
- It also updates default commit history length to 300.

(From OE-Core rev: 64275a41c37130aaaacc5e592f94a1afe057119b)

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-15 16:39:19 +01:00
Richard Purdie
57a1ccaa19 oe-build-perf-report: Ensure correct data is shown for multiple branch options
If --branch and --branch2 are the same, there is extra confusing data plotted
onto the graph. Only do that if the branches are actually different.

(From OE-Core rev: c263d810b7eb47ee90f2adeb5ab6decf7332bec2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-10 13:37:56 +01:00
Richard Purdie
5088e3b64b scripts/oe-build-perf-report: Allow operation with no buildstats
If buildstats is missing, avoid a backtrace.

(From OE-Core rev: 23c4b21f947c7aae1303ca6526fc5aaaa9fc7bb8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-10 13:37:56 +01:00
Richard Purdie
da4fb13f6d scripts/oe-build-perf-report: Use python3 from the environment
This means ot matches the rest of the system rather than causing confusing errors
where multiple python versions are mixed.

(From OE-Core rev: ef4138b6d8575fb4a0e9dfbaec2cb766f3705efb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-20 12:47:48 +01:00
Richard Purdie
de6f1393e9 scripts/oe-build-perf-report: Avoid buildstats warning
When a comparision branch is set we see warnings. If two branches are used,
look for buildstats information from both to avoid this kind of warning:

INFO: Parsing buildstats from 'refs/notes/buildstats/perf-centos7.yoctoproject.org/master-next/qemux86'
WARNING: Buildstats not found for perf-centos7.yoctoproject.org/master/qemux86/56808-g08220028e52992dcba667fc97bf3afe8be1949fb/0
WARNING: Buildstats not found for perf-centos7.yoctoproject.org/master/qemux86/56808-g08220028e52992dcba667fc97bf3afe8be1949fb/1
INFO: Buildstats were missing for some test runs, please run 'git fetch origin refs/notes/buildstats/perf-centos7.yoctoproject.org/master-next/qemux86:refs/notes/buildstats/perf-centos7.yoctoproject.org/master-next/qemux86' and try again

(the warning is due to stats being looked for in both branches, choose
the other branch and different warnings would be shown)

(From OE-Core rev: af58c18fcd0451540dd77ee862956b2b9dee17c4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-13 13:07:01 +00:00
Richard Purdie
ffae400179 meta/lib+scripts: Convert to SPDX license headers
This adds SPDX license headers in place of the wide assortment of things
currently in our script headers. We default to GPL-2.0-only except for the
oeqa code where it was clearly submitted and marked as MIT on the most part
or some scripts which had the "or later" GPL versioning.

The patch also drops other obsolete bits of file headers where they were
encoountered such as editor modelines, obsolete maintainer information or
the phrase "All rights reserved" which is now obsolete and not required in
copyright headers (in this case its actually confusing for licensing as all
rights were not reserved).

More work is needed for OE-Core but this takes care of the bulk of the scripts
and meta/lib directories.

The top level LICENSE files are tweaked to match the new structure and the
SPDX naming.

(From OE-Core rev: f8c9c511b5f1b7dbd45b77f345cb6c048ae6763e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-09 16:31:55 +01:00
Richard Purdie
95bd530b77 oe-build-perf-report/gitarchive: Move common useful functions to library
These functions can be reused by the resulttool code so move to the common
function library for this purpose.

(From OE-Core rev: c66f848938c04e133259c5b6903dc592866ab385)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-21 12:34:00 +00:00
Richard Purdie
be52da152a oe-build-perf-report: Fix missing buildstats comparisions
Integers were being compared to strings leading to missing buildstats comparision
data. Fix this.

(From OE-Core rev: 2dbbf598192ae2b3aa488df042f56aa6c6634a00)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-11 17:47:10 +00:00
Richard Purdie
da960154ea oe-build-perf-report: Improve branch comparision handling
When comparing branches, correctly filter the revisions corresponding
to the specific branch specified.

Also use the commit numbers as a way to gauge spatially related commits
for comparision meaning comparisions for out of order build revisions
becomes meaninful.

This should improve the reporting for autobuilder generated builds.

Also improve the branch option help text.

(From OE-Core rev: 9f6f4ab6eec9dca07af7f53da5f737a6167bfb38)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-11 17:47:10 +00:00
Richard Purdie
e0a58a99c4 oe-build-perf-report: Allow commits from different branches
The code won't currently allow comparisions of two commits on different
branches even if the commits are specified by their hashes.

This updates the code to search two branches for any relavent commits,
hence allowing comparisions to be made. A particularly useful case is
master vs. master-next for example.

(From OE-Core rev: 2d835bb1570c515ae501442f3ce19fae8e249b27)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-08 23:15:32 +00:00
Richard Purdie
054ecaba78 oe-build-perf-report: Allow branch without hostname
Allow the branch to be set without the hostname option. Previously
if hostname wasn't set, branch would be overwritten regardless of
whether it was set or not.

(From OE-Core rev: 3ec43bf4c6c8f7730a67f63ad4e14903f289014e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-08 23:15:32 +00:00
Ross Burton
4d2b500a08 oe-buildperf-report: highlight large changes in the HTML report
If the relative difference is greater than 2%, make the text bold to highlight
it.

(From OE-Core rev: 500e28311248713d4772480b81b10777390da909)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-05-11 07:49:38 +01:00
Markus Lehtonen
dec7f4f17d scripts/oe-build-perf-report: fix comparing arbitrary commits
Fix a crash when generating a txt report and the two commits to be
compared were not consecutive (but there were some tested commits
between them).

(From OE-Core rev: f3afd2c47f4c740df52dfd80e208ce721d5ebf6e)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-16 03:42:09 -07:00
Markus Lehtonen
6c222a5c11 scripts/oe-build-perf-report: show recipe version changes in html report
If buildstats are available (for a certain measurement), show recipe
version changes between the two builds that are being compared. The
information shown includes new and dropped recipes as well as changes in
recipe version, revision or epoch.

[YOCTO #11382]

(From OE-Core rev: 46eb839b51bb1466a9feeb09c9c437d6d45576cc)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-18 11:07:30 +01:00
Markus Lehtonen
81aef784fd scripts/oe-build-perf-report: summary of task resource usage
Utilize buildstats, if available, and show a summary of the resource
usage of bitbake tasks in the html report. The details provided are:
- total number of tasks
- top 5 resource-hungry tasks (cputime)
- top 5 increase in resource usage (cputime)
- top 5 decrease in resource usage (cputime)

[YOCTO #11381]

(From OE-Core rev: ddd9443cb2432af2c15b358bfda708393fa3c417)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-18 11:07:30 +01:00
Markus Lehtonen
eaeb698129 scripts/oe-build-perf-report: provide valid title in the html report
(From OE-Core rev: 46312fde635a717e41d12e7ef01940838316ae17)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-18 11:07:30 +01:00
Markus Lehtonen
93139fb66e scripts/oe-build-perf-report: remove dead code
Some leftover from an early prototype.

(From OE-Core rev: a28284fc1bbaa18162f65eee0ae2e94d28091b2f)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-18 11:07:30 +01:00
Markus Lehtonen
0821f3b0f8 scripts/oe-build-perf-report: use --hostname in --list
Makes it possible to list test results for certain host only, instead of
always listing all results from all hosts.

(From OE-Core rev: 3c07f1f05440234243c570ebfb42dcda2f455a3d)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-18 11:07:30 +01:00
Markus Lehtonen
a7461ad2a2 scripts/oe-build-perf-report: fix handling of --history-length
Don't crash if 'left' revision is older than the range of commits
specified with '--history-length'. In this case the 'left' revision
takes precedence.

(From OE-Core rev: cbeb1fb27329f8eba4d779d22fcad56f0fb03947)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-18 11:07:30 +01:00
Markus Lehtonen
062bdb044c scripts/oe-build-perf-report: add AggregateTestData class
Making the code a bit more readable.

(From OE-Core rev: 25351c7cac167b1a3e8b531e2cdf708192c6fa1f)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-18 11:07:30 +01:00
Markus Lehtonen
ec5a5f28e2 scripts/oe-build-perf-report: fix dumping buildstats
Fix a misbehavior when some of the buildstats are missing.

(From OE-Core rev: 2930515acb5cfdcd335a76ae36fd9f7189207aa3)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-18 11:07:30 +01:00
Markus Lehtonen
d6c437ff6c oe-build-perf-report: implement --dump-buildstats
For dumping buildstats from the test runs being reported. The output
directory where buildstats are copied is 'oe-build-perf-buildstats/'.
Buildstats can be then further analyzed with buildstats-diff script, for
example.

[YOCTO #11355]

(From OE-Core rev: e06266798d975bd6bebdb6bfdbd3d21be1c44ffd)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-05-23 17:45:36 +01:00
Markus Lehtonen
1c46fbd628 oe-build-perf-report: two verbosity levels for --list
(From OE-Core rev: a77066751c81f27332cc16c565dff6a45c173b6c)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-05-23 17:45:36 +01:00
Markus Lehtonen
e1f84ea823 oe-build-perf-report: use correct x-axis max value in html charts
(From OE-Core rev: 1d99b018c2b6a44b9db2f2ede113e64dae751eee)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-05-23 17:45:36 +01:00
Markus Lehtonen
5403db7f40 oe-build-perf-report: allow slashes in {branch} field in tag names
The target branch name might contain slashes.

(From OE-Core rev: 3ddde7d5bcffdd855dae0da6ba5feec752cbacec)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-05-18 14:01:47 +01:00
Markus Lehtonen
cdb02b7d93 oe-build-perf-report: accept parenthesis in tag names
(From OE-Core rev: b1feae0e23300ea3894d14d2e7b1c1f8b419146e)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-05-18 14:01:47 +01:00
Markus Lehtonen
dff701ffd4 scripts/oe-build-perf-report: improve guessing of args
Search remote branches, too, when finding the latest commit.

(From OE-Core rev: 7b502702be5d484c6f1f903426ba63cf04f8ca4a)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-10 23:00:44 +01:00
Markus Lehtonen
04e31f33c8 scripts/oe-build-perf-report: fix typo
(From OE-Core rev: 0a05ccfeba2f185ef9ea78a23bc376d4b97ec547)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-05 23:22:13 +01:00
Markus Lehtonen
728c668473 scripts/oe-build-perf-report: better guessing of args
When getting info from the latest commit, don't search all refs but only
branches. We don't get correct data from refs/tags/* or refs/notest/*,
for example.

(From OE-Core rev: f84d0bd7deb4c19fdb1e821b3a50e8c8f54a731b)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-05 23:22:13 +01:00
Markus Lehtonen
9f299876f7 scripts: add oe-build-perf-report script
A new tool for pretty-printing build perf test results stored in a Git
repository. The scripts is able to produce either simple plaintext
report showing the difference between two commits, or, an html report
that also displays trendcharts of the test results. The script uses
Jinja2 templates for generating HTML reports so it requires
python3-jinja2 to be installed on the system.

[YOCTO #10931]

(From OE-Core rev: 3b25404f0f99b72f222bdca815929be1cf1cee35)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-01 23:28:20 +01:00