A command-line tool is a program operated through textual commands in a shell or terminal. It automates tasks with speed, consistency, and configurable behavior. section 4.0
A practical command-line interface separates inputs by purpose:
- Arguments provide necessary parameters, such as a URL. section 4.0
- Flags provide optional settings, such as concurrency or verbose output. section 4.0
- Input parsing can begin with os and progress to flag, including custom flag.Value types and validation. section 4.0
HIT performance tool
A command such as ./hit -n 1_000_000 -c 20 http://localhost:8082 sends one million HTTP requests with concurrency 20, then reports success, requests per second, errors, bytes, duration, and response-time extremes. section 4.0
$ ./hit -n 1_000_000 -c 20 http://localhost:8082 #1
__ __ __ ______
/\ \_\ \ /\ \ /\__ _\
\ \ __ \ \ \ \ \/_/\ \/
\ \_\ \_\ \ \_\ \ \_\
\/_/\/_/ \/_/ \/_/
Sending 1000000 requests to "http://localhost:8082" (concurrency: 20)
Summary:
Success: 100%
RPS: 97854.73
Requests: 1000000
Errors: 0
Bytes: 12000000
Duration: 10.22s
Fastest: 1ms
Slowest: 5ms
Inspect a complete terminal invocation and its performance summary to connect flags and arguments with observable output. section 4.0


