mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-18 12:06:08 +00:00
framework/output: Speedup discover_wa_outputs()
Avoid recursing into subdirectory of folders containing __meta, since they are not of interest and recursing can take a very large amount of time if there are lot of files, like if there is a sysfs dump.
This commit is contained in:
parent
9edb6b20f0
commit
ab9e29bdae
@ -776,9 +776,13 @@ def init_job_output(run_output, job):
|
||||
|
||||
|
||||
def discover_wa_outputs(path):
|
||||
for root, dirs, _ in os.walk(path):
|
||||
# Use topdown=True to allow pruning dirs
|
||||
for root, dirs, _ in os.walk(path, topdown=True):
|
||||
if '__meta' in dirs:
|
||||
yield RunOutput(root)
|
||||
# Avoid recursing into the artifact as it can be very lengthy if a
|
||||
# large number of file is present (sysfs dump)
|
||||
dirs.clear()
|
||||
|
||||
|
||||
def _save_raw_config(meta_dir, state):
|
||||
|
Loading…
x
Reference in New Issue
Block a user