Skip to content

Instantly share code, notes, and snippets.

@copyleftdev
Created May 25, 2026 20:43
Show Gist options
  • Select an option

  • Save copyleftdev/210c56c0098763a59abf0ea8543525d3 to your computer and use it in GitHub Desktop.

Select an option

Save copyleftdev/210c56c0098763a59abf0ea8543525d3 to your computer and use it in GitHub Desktop.
pv — pipe viewer: progress bar and throughput for any pipeline
# pv — add a progress bar to any pipeline
pv input.jsonl > /dev/null # bytes + throughput
pv --line-mode input.jsonl | process-tool # line count mode
# Drop into any pipeline — transparent pass-through:
cat input.jsonl | pv | python3 process.py
# ETA with known total:
LINES=$(wc -l < input.jsonl)
pv --line-mode --size "$LINES" input.jsonl | inference-tool
# Rate-limit a fast producer for a slow consumer:
pv --rate-limit 1024 input.jsonl | slow-api-caller
# Sample output:
# 307 KiB 0:00:00 [1.21 MiB/s] [================================>] 100%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment