def create_local_source(self, size=1024): StopWatch.start(f"create source {size}") source = path_expand(f"{tmp}/source/{size}.txt") Benchmark.file(source, size) StopWatch.stop(f"create source {size}") # test if the files are ok assert True
def create_local_source(self, size=1024): StopWatch.start(f"create source {size}") source = path_expand(f"~/.cloudmesh/storage/temp/{size}.txt") Benchmark.file(source, size) StopWatch.stop(f"create source {size}") # test if the files are ok assert True
def test_create_source(self): HEADING() local_test = "~/.cloudmesh/storage/test" if not (os.path.exists(path_expand(local_test))): os.mkdir(path_expand(local_test)) for fileSize in fileSizes: Benchmark.file( path_expand(f'{local_test}/test_file_size_{fileSize}.txt'), fileSize)
def test_create_local_source(self): HEADING() sizes = [1, 10] for size in sizes: texttag = f"create size-{size} file" StopWatch.start(texttag) source = path_expand(f"~/.cloudmesh/storage/test/size-" f"{size}-file.txt") d = Path(os.path.dirname(path_expand(source))) d.mkdir(parents=True, exist_ok=True) Benchmark.file(source, size) StopWatch.stop(texttag) assert True