Skip to content

Commit cf2deda

Browse files
s/ensureDir/ensure_directory_exists/g
1 parent e966fe6 commit cf2deda

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

perfmetrics/scripts/testing_on_gke/examples/dlio/parse_logs.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
sys.path.append("../")
2828
import dlio_workload
2929
from utils.utils import get_memory, get_cpu, unix_to_timestamp, standard_timestamp, is_mash_installed, get_memory_from_monitoring_api, get_cpu_from_monitoring_api, timestamp_to_epoch
30-
from utils.parse_logs_common import ensureDir, download_gcs_objects, parse_arguments, SUPPORTED_SCENARIOS
30+
from utils.parse_logs_common import ensure_directory_exists, download_gcs_objects, parse_arguments, SUPPORTED_SCENARIOS
3131

3232
_LOCAL_LOGS_LOCATION = "../../bin/dlio-logs/logs"
3333

@@ -297,7 +297,7 @@ def writeRecordsToCsvOutputFile(output: dict, output_file_path: str):
297297

298298
if __name__ == "__main__":
299299
args = parse_arguments()
300-
ensureDir(_LOCAL_LOGS_LOCATION)
300+
ensure_directory_exists(_LOCAL_LOGS_LOCATION)
301301

302302
dlioWorkloads = dlio_workload.ParseTestConfigForDlioWorkloads(
303303
args.workload_config
@@ -313,7 +313,7 @@ def writeRecordsToCsvOutputFile(output: dict, output_file_path: str):
313313
output_file_path = args.output_file
314314
# Create the parent directory of output_file_path if doesn't
315315
# exist already.
316-
ensureDir(os.path.dirname(output_file_path))
316+
ensure_directory_exists(os.path.dirname(output_file_path))
317317
writeRecordsToCsvOutputFile(output, output_file_path)
318318
print(
319319
"\n\nSuccessfully published outputs of DLIO test runs to"

perfmetrics/scripts/testing_on_gke/examples/fio/parse_logs.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
sys.path.append("../")
2828
import fio_workload
2929
from utils.utils import get_memory, get_cpu, unix_to_timestamp, is_mash_installed, get_memory_from_monitoring_api, get_cpu_from_monitoring_api
30-
from utils.parse_logs_common import ensureDir, download_gcs_objects, parse_arguments, SUPPORTED_SCENARIOS
30+
from utils.parse_logs_common import ensure_directory_exists, download_gcs_objects, parse_arguments, SUPPORTED_SCENARIOS
3131

3232
_LOCAL_LOGS_LOCATION = "../../bin/fio-logs"
3333

@@ -73,7 +73,7 @@ def downloadFioOutputs(fioWorkloads: set, instanceId: str) -> int:
7373
dstDir = (
7474
_LOCAL_LOGS_LOCATION + "/" + instanceId + "/" + fioWorkload.fileSize
7575
)
76-
ensureDir(dstDir)
76+
ensure_directory_exists(dstDir)
7777

7878
srcObjects = f"gs://{fioWorkload.bucket}/fio-output/{instanceId}/*"
7979
print(f"Downloading FIO outputs from {srcObjects} ...")
@@ -324,7 +324,7 @@ def writeRecordsToCsvOutputFile(output: dict, output_file_path: str):
324324

325325
if __name__ == "__main__":
326326
args = parse_arguments()
327-
ensureDir(_LOCAL_LOGS_LOCATION)
327+
ensure_directory_exists(_LOCAL_LOGS_LOCATION)
328328

329329
fioWorkloads = fio_workload.ParseTestConfigForFioWorkloads(
330330
args.workload_config
@@ -340,7 +340,7 @@ def writeRecordsToCsvOutputFile(output: dict, output_file_path: str):
340340
output_file_path = args.output_file
341341
# Create the parent directory of output_file_path if doesn't
342342
# exist already.
343-
ensureDir(os.path.dirname(output_file_path))
343+
ensure_directory_exists(os.path.dirname(output_file_path))
344344
writeRecordsToCsvOutputFile(output, output_file_path)
345345
print(
346346
"\n\nSuccessfully published outputs of FIO test runs to"

perfmetrics/scripts/testing_on_gke/examples/utils/parse_logs_common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
]
2929

3030

31-
def ensureDir(dirpath: str):
31+
def ensure_directory_exists(dirpath: str):
3232
try:
3333
os.makedirs(dirpath)
3434
except FileExistsError:

0 commit comments

Comments
 (0)