mirror of
https://git.yoctoproject.org/poky
synced 2026-09-14 03:49:32 +02:00
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. (From OE-Core rev: dadb84936b3672dcf07e5ab8226158136762801f) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
4189a1977e
commit
b16001f3e2
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user