Skip to content

Commit

Permalink
fix: remove rem check from app-cache --clear
Browse files Browse the repository at this point in the history
  • Loading branch information
18alantom committed Jan 19, 2024
1 parent c5ec4f7 commit 4e170a2
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions bench/utils/bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -748,11 +748,8 @@ def cache_clear() -> None:
tot_size = get_dir_size(cache_path)
shutil.rmtree(cache_path)

rem_items = tot_items - len(os.listdir(cache_path))
rem_size = tot_size - get_dir_size(cache_path)

if rem_items:
click.echo(f"Cleared {rem_size / 1_000_000:.3f} MB belonging to {rem_items} items")
if tot_items:
click.echo(f"Cleared {tot_size / 1_000_000:.3f} MB belonging to {tot_items} items")


def get_dir_size(p: Path) -> int:
Expand Down

0 comments on commit 4e170a2

Please sign in to comment.