Skip to content

Commit

Permalink
Remove verbose disk usage stats
Browse files Browse the repository at this point in the history
  • Loading branch information
orf committed Oct 20, 2024
1 parent 760eb53 commit f877534
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/pypi_data/combine_parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,14 @@ def log_system_stats(path: Path):
f"mem_used={ByteSize(mem.used).human_readable(decimal=True)} "
f"mem_percent={mem.percent:.1f}%"
)
for partition in psutil.disk_partitions(all=False):
disk_usage = psutil.disk_usage(partition.mountpoint)
log.info(
f"Disk: ({partition.fstype} - {partition.mountpoint}) "
f"total={ByteSize(disk_usage.total).human_readable(decimal=True)} "
f"used={ByteSize(disk_usage.used).human_readable(decimal=True)} "
f"free={ByteSize(disk_usage.free).human_readable(decimal=True)} "
f"percent={disk_usage.percent:.1f}%"
)
disk_usage = psutil.disk_usage(str(path))
log.info(
f"Disk: "
f"total={ByteSize(disk_usage.total).human_readable(decimal=True)} "
f"used={ByteSize(disk_usage.used).human_readable(decimal=True)} "
f"free={ByteSize(disk_usage.free).human_readable(decimal=True)} "
f"percent={disk_usage.percent:.1f}%"
)


def buffer_mem_size(buffer: Deque[tuple[tuple[int, str], RecordBatch]]) -> int:
Expand Down

0 comments on commit f877534

Please sign in to comment.