feat(cli): enhance duration parsing with humantime
Allow fractional and composite duration inputs for `--duration` and `--interval` options.
This commit is contained in:
7 files changed
+29
-56
No files matched your search
@@ -174,6 +174,12 @@ expansion: a hostname producing both families consumes two target slots.
|
||||
|
||||
## FINITE VERSUS CONTINUOUS OPERATION
|
||||
|
||||
`--duration` and `--interval` accept fractional and composite durations, such as
|
||||
`2.5s`, `1m30s`, and `1h`, as well as `ms`, `us` (or `µs`), and `ns` units
|
||||
(e.g. `500us` or `100ns`). A nonzero value requires a unit. The interval must
|
||||
be greater than zero; a zero test duration, including `0s`, selects continuous
|
||||
mode.
|
||||
|
||||
`--duration` controls the run length:
|
||||
|
||||
- Any nonzero duration (default `10s`) is a **finite** run: probing stops
|
||||
|
||||
+4
-1
@@ -40,7 +40,10 @@ See the client manual's address-family section for discovery errors and labels.
|
||||
|
||||
Unlike `irtt-client`, **the TUI defaults to continuous mode**
|
||||
(`--duration 0`): it runs until you quit. Pass an explicit `--duration` for
|
||||
a finite run:
|
||||
a finite run. Both `--duration` and `--interval` use the
|
||||
[client duration syntax](irtt-client.md#finite-versus-continuous-operation),
|
||||
including fractional values (`2.5s`), composite values (`1m30s`), and units
|
||||
from nanoseconds (`ns`) through hours (`h`):
|
||||
|
||||
```sh
|
||||
irtt-tui <server> --duration 30s
|
||||
|
||||
Reference in new issue
Block a user