quinn-perf table output not suppressed in json mode
## Problem
While neither the command-line help nor the comments in the code elaborate on the expected behavior when `--json` is specified in a quinn-perf client's arguments, based on intuition and experience using iperf3, one would assume that enabling it automatically suppresses all text- or table-based output (at least when the JSON output target is stdout, e.g., when specifying `--json -`).
Currently, this is not the case.
## Possible Resolution
Since json output is implemented as an optional compile-time feature, the easiest solution I can imagine for disabling is to add a conditionally included if expression before invoking `stats.print()` and any additional `println!` macros present in [client.rs](https://github.com/quinn-rs/quinn/tree/main/perf/src/client.rs). This feels a bit quirky though.
3 条评论