This task asks you to implement a tiny, portable benchmark that stresses both I/O and CPU by processing many small files in parallel.
What you will build:
A small CLI benchmark script (benchmark.sh) that processes files from an input directory using a configurable number of worker processes.
It supports a few simple file operations (e.g., hashing contents, counting lines, or reversing data).
It emits per-file results and a final summary with throughput and latency metrics.
How to implement (guidance, not constraints):
Use only standard tooling when possible (bash, coreutils, Python, or Node are acceptable).
Accept inputs via command-line flags: --input-dir, --output-dir, --workers, --operation, and --duration.
Collect a list of regular files under input-dir (recursively) and run transformations concurrently with a fixed-size worker pool.
Write a small manifest (JSON) with fields: file, bytes, latency_ms, operation, and result. Print a concise summary after the run ends or when the duration expires.
Deliverables:
benchmark.sh (the runner) and an optional helper like processor.py or processor.sh for the actual work.
generate_dataset.sh to create a sample input directory with N small files.
README.md with run instructions and a minimal example.