diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2016-10-05 16:29:49 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-10-05 14:38:24 +0100 |
commit | dadb84936b3672dcf07e5ab8226158136762801f (patch) | |
tree | 18afa6aadbefe099fa915ce5c974f06e2391f279 /meta/lib/oeqa/buildperf/base.py | |
parent | d408b79dba47e4392a9d13aff1660a1e483a765c (diff) | |
download | openembedded-core-dadb84936b3672dcf07e5ab8226158136762801f.tar.gz openembedded-core-dadb84936b3672dcf07e5ab8226158136762801f.tar.bz2 openembedded-core-dadb84936b3672dcf07e5ab8226158136762801f.zip |
oeqa.buildperf: measure apparent size instead of real disk usage
This change aligns disk usage measurements of the eSDK test with the old
build-perf-test.sh script. And thus, also makes the results between the
old and the new script comparable.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/buildperf/base.py')
-rw-r--r-- | meta/lib/oeqa/buildperf/base.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/meta/lib/oeqa/buildperf/base.py b/meta/lib/oeqa/buildperf/base.py index 2c102554b9..59dd02521c 100644 --- a/meta/lib/oeqa/buildperf/base.py +++ b/meta/lib/oeqa/buildperf/base.py @@ -408,9 +408,14 @@ class BuildPerfTestCase(unittest.TestCase): int((e_sec % 3600) / 60), e_sec % 60)) - def measure_disk_usage(self, path, name, legend): + def measure_disk_usage(self, path, name, legend, apparent_size=False): """Estimate disk usage of a file or directory""" - ret = runCmd2(['du', '-s', path]) + cmd = ['du', '-s', '--block-size', '1024'] + if apparent_size: + cmd.append('--apparent-size') + cmd.append(path) + + ret = runCmd2(cmd) size = int(ret.output.split()[0]) log.debug("Size of %s path is %s", path, size) measurement = {'type': self.DISKUSAGE, |