diff --git a/benchmarks/benchmark_datacatalog.py b/benchmarks/benchmark_datacatalog.py index d3b12e44ea..15de4ef310 100644 --- a/benchmarks/benchmark_datacatalog.py +++ b/benchmarks/benchmark_datacatalog.py @@ -36,6 +36,9 @@ def setup(self): f"param_{i}": i for i in range(1, 1001) } + def time_init(self): + """Benchmark the time to initialize the catalog""" + DataCatalog.from_config(base_catalog) def time_save(self): """Benchmark the time to save datasets""" diff --git a/benchmarks/benchmark_ocl.py b/benchmarks/benchmark_ocl.py index 5c38b61901..2dfd970a2e 100644 --- a/benchmarks/benchmark_ocl.py +++ b/benchmarks/benchmark_ocl.py @@ -33,13 +33,13 @@ def _generate_globals(start_range, end_range, is_local=False): return globals_dict def _create_config_file(conf_source, env, file_name, data): - env_path = conf_source / env - env_path.mkdir(parents=True, exist_ok=True) - file_path = env_path / file_name + env_path = conf_source / env + env_path.mkdir(parents=True, exist_ok=True) + file_path = env_path / file_name - import yaml - with open(file_path, "w") as f: - yaml.dump(data, f) + import yaml + with open(file_path, "w") as f: + yaml.dump(data, f) base_catalog = _generate_catalog(1, 1000, is_versioned=True) local_catalog = _generate_catalog(501, 1500, is_local=True)