summaryrefslogtreecommitdiffstats
path: root/scripts/lib/buildstats.py
Commit message (Collapse)AuthorAgeFilesLines
* scripts/lib/buildstats: handle top-level build_stats not being completeRoss Burton2023-03-251-0/+1
| | | | | | | | | | | | | | | | If we try to parse a buildstats directory which was either aborted or is still being built then the top-level build_stats file doesn't contain an elapsed value which causes an exception: UnboundLocalError: local variable 'elapsed' referenced before assignment Default both start and elapsed to 0 so that the parse succeeds. (From OE-Core rev: 701d985aa8f2e9c2b9c0736fa25b424f3701889e) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/buildstats: handle tasks that never finishedRoss Burton2023-02-171-6/+27
| | | | | | | | | | If a task is aborted the buildstats file isn't complete, so calculate when the build finished and use that as a end time. (From OE-Core rev: 23ebaec476dc46aebe5997f025661137f3e341bd) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/buildstats: fix parsing of trees with reduced_proc_pressure directoriesRoss Burton2022-12-081-2/+2
| | | | | | | | | | | | | | The /proc/pressure support in buildstats is creating directories in the buildstats tree called reduced_proc_pressure, which confuses the parsing logic as that cannot be parsed as a name-epoc-version-revision tuple. Explicitly skip this directory to solve the problem. (From OE-Core rev: 24f0331f0b7e51161b1fa43d4592b491d2037fe9) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/buildstats-diff: Add option to filter tasksJoshua Watt2019-07-171-1/+5
| | | | | | | | | | | | | | | | Adds a command line option to filter out the buildstats-diff report by one more more tasks. e.g.: buildstats-diff --only-task do_compile A B will only show the differences for do_compile tasks. The --only-task option can be specified multiple times to filter out multiple tasks at once. (From OE-Core rev: a8c7960d24c48107fd3703e49c38f890e84e2226) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/lib+scripts: Convert to SPDX license headersRichard Purdie2019-05-091-8/+1
| | | | | | | | | | | | | | | | | | | | | | | 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>
* lib/buildstats: Improve error messageRichard Purdie2019-02-161-1/+1
| | | | | | | | | Just stating the recipe counts are different isn't helpful, showing the differences makes it much easier to understand what changed. (From OE-Core rev: 1d84b782e3af6f0e6922d72895c905877cc33739) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/oe-build-perf-report: show recipe version changes in html reportMarkus Lehtonen2017-09-181-2/+13
| | | | | | | | | | | | | | | 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>
* scripts/buildstats-diff: move more code to lib/buildstats.pyMarkus Lehtonen2017-09-181-1/+30
| | | | | | | | | | | | | | More refactoring of buildstats-diff script. Move recipe version comparison functionality to scripts/lib/buildstats.py. This patch also compasses some wording changes, i.e. changing 'package' to 'recipe'. [YOCTO #11382] (From OE-Core rev: 2f8942d6830258fcbe1925f12ba1516def32d132) 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>
* scripts/oe-build-perf-report: summary of task resource usageMarkus Lehtonen2017-09-181-0/+8
| | | | | | | | | | | | | | | | | 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>
* scripts/buildstats-diff: move code to lib/buildstats.pyMarkus Lehtonen2017-09-181-0/+301
Move over code from buildstats-diff to new scripts/lib/buildstats.py module in order to share code related to buildstats processing. Also, refactor the code, introducing new classes to make the code readable, maintainable and easier to debug. [YOCTO #11381] (From OE-Core rev: 8a2cd9afc95919737d8e75234e78bbc52e1494a1) 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>