diff options
author | Aryaman Gupta <aryaman.gupta@windriver.com> | 2022-06-22 15:21:05 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-06-29 16:16:56 +0100 |
commit | 1125adc33b3696ffd351ffec9445f0c09b178fde (patch) | |
tree | 779280e529cc33d44d40bbe3db524069c0a41b80 /scripts/lib/devtool/utilcmds.py | |
parent | 45f1e9d95320a45d7c38a0db34a643272e3add23 (diff) | |
download | poky-1125adc33b3696ffd351ffec9445f0c09b178fde.tar.gz |
buildstats.bbclass: correct sampling of system stats
The last time of sampling would be updated within the SystemStats class
but not re-recorded into the datastore, leading to multiple samples being
collected in the same second in the sample function of buildstats.py.
Fix this to collect and store only one sample per second within a
certain tolerance to deal with variation in the arrival time.
This fix elimates the spikiness of sampled data, in cases where the difference
between the current and the last sample is taken. Previously, since many
samples per second were recorded, certain types of data would result in a
very small elapsed time and hence a small numerical difference. For example,
the CPU usage from /proc/stat is a running total of usage and taking the
difference between data collected 0.1 seconds apart would result in usage
appearing lower than it actually was.
(From OE-Core rev: 0e2df45ab066bb4ad2c4f8622ee9c1a8ecdea9cb)
Signed-off-by: Aryaman Gupta <aryaman.gupta@windriver.com>
Signed-off-by: Randy MacLeod <randy.macleod@windriver.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/devtool/utilcmds.py')
0 files changed, 0 insertions, 0 deletions