summaryrefslogtreecommitdiffstats
path: root/meta/lib/buildstats.py
Commit message (Collapse)AuthorAgeFilesLines
* meta: remove True option to getVar callsJoshua Lock2016-12-161-2/+2
| | | | | | | | | | | | | getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) (From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildstats.py: skip collecting unavailable /proc dataPatrick Ohly2016-12-131-7/+12
| | | | | | | | | | | | | | | | | | | | | | Some virtualized environments like Linux-VServer do not have the entries under /proc that the new system usage sampling expected, leading to an exception when trying to open the files. Now the presence of these files is checked once before enabling the corresponding data collection. When a file is missing, the corresponding log file is not written either and pybootchart will not draw the chart that normally displays the data. Errors while reading or writing of data samples is intentionally still a fatal error, because that points towards a bigger problem that should not be ignored. Reported-by: Andreas Oberritter <obi@opendreambox.org> (From OE-Core rev: daeee2d6731014c33f0d1f8a3846830c099932b4) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildstats: reduce amount of data stored for system utilizationPatrick Ohly2016-12-071-10/+104
| | | | | | | | | | | | | | | | Pre-processing /proc data during the build considerably reduces the amount of data written to disk: 176KB instead of 4.7MB for a 20 minuted build. Parsing also becomes faster. The disk monitor log added another 16KB in that example build. The overall buildstat was 20MB, so the overhead for monitoring system utilization is small enough that it can be enabled by default. (From OE-Core rev: b17812385cd55e81066d3ceda92dffdc6e5564da) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildstats: record disk space usagePatrick Ohly2016-12-071-5/+17
| | | | | | | | | | | | | Hooks into the new monitordisk.py event and records the used space for each volume. That is probably the only relevant value when it comes to visualizing the build and recording more would only increase disk usage. (From OE-Core rev: 21a5b569370f47cc02291e1d8b76fe43faa04ea6) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildstats: add system state samplingPatrick Ohly2016-12-071-0/+47
/proc/[diskstats|meminfo|stat] get sampled and written to the same proc_<filename>.log files as during normal bootchat logging. This will allow rendering the CPU, disk and memory usage charts. Right now sampling happens once a second, triggered by the heartbeat event.That produces quite a bit of data for long builds, which will be addressed in a separate commit by storing the data in a more compact form. (From OE-Core rev: 6f4e8180b5b4857eaf6caf410fd3a4a41ed85930) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>