[PATCH 0/1] buildstats.bbclass: add functionality to collect

Sakib Sajal
2020-10-23T16:57:04Z

This functionality allows users to log host stats on a regualar
interval and/or upon failure.

Initial implementation design was to predefine a list of commands
to collect host system stats.

Obstacles:
Event TaskFailed runs in recipe specific environments, ie, the PATH
variable does not point to host tools. Moreover, having a predefined
list of tools to run is rigid and many of the tools may not be
available on the host system.

Solution:
Allow users to specify the tools with the absolute path, as well as
the desired options to be run. The onus is on the users to make sure the
tools exist and the command runs to completion and exits.

Built core-image-minimal with an interval of 10s which resulted in a
log file of size 15Mb at a cost of 1-2% increase in build time.
core-image-minimal tmp-glibc is ~20Gb, and this increase is a trivial
increase.

Grepping the log file for specific tokens give a useful indication of
how the system resources are being used.

To Do:
1) Do selftests need to be added for this functionality?
2) Documentation about the usage.

Sakib Sajal (1):
buildstats.bbclass: add functionality to collect build system stats

meta/classes/buildstats.bbclass | 33 ++++++++++++++++++++++++++++++---
1 file changed, 30 insertions(+), 3 deletions(-)

--
2.26.2