Skip to content

Commit

Permalink
fix delete
Browse files Browse the repository at this point in the history
  • Loading branch information
carneiro-cw committed Dec 2, 2024
1 parent fcd6a5c commit 8d14bef
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions utils/benchmark_rocks_config/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,15 @@ def main():
config_files = list(Path(CONFIGS_FOLDER).glob("*.rs"))

for config_file in sorted(config_files):
# Delete files in the previous database
# Delete files in the previous database
db_path = Path("../../data")
if db_path.exists():
shutil.rmtree(db_path)
print("Cleared previous database")
for item in db_path.iterdir():
if item.is_file():
item.unlink()
elif item.is_dir():
shutil.rmtree(item)
print("Cleared previous database contents")
db_path.mkdir(parents=True, exist_ok=True)

print(f"\nTesting config: {config_file}")
Expand Down

0 comments on commit 8d14bef

Please sign in to comment.