mirror of
https://github.com/vacp2p/wakurtosis.git
synced 2026-01-09 14:58:02 -05:00
Minor
This commit is contained in:
@@ -289,13 +289,7 @@ def gather_probes(containers_data, probes_ids, num_threads=16):
|
||||
return all_containers_metrics
|
||||
|
||||
def save_metrics_to_disk(metrics, filename):
|
||||
# Get the parent directory of the file
|
||||
parent_directory = os.path.dirname(filename)
|
||||
|
||||
# Create the parent directory if it does not exist
|
||||
if not os.path.exists(parent_directory):
|
||||
os.makedirs(parent_directory)
|
||||
|
||||
|
||||
# Save the metrics to the file
|
||||
with open(filename, 'w') as f:
|
||||
json.dump(metrics, f, indent=4)
|
||||
|
||||
Reference in New Issue
Block a user