perf(cli): use LineWriter for stdout to improve output responsiveness
Switch from BufWriter to LineWriter to ensure trace logs and events are flushed to the terminal immediately upon each line completion.
This commit is contained in:
1 parent
be473d04ad
commit
49b48bdce2
1 file changed
+1
-1
@@ -28,7 +28,7 @@ fn main() -> ExitCode {
|
|||||||
|
|
||||||
fn run(args: CliArgs) -> Result<(), Box<dyn std::error::Error>> {
|
fn run(args: CliArgs) -> Result<(), Box<dyn std::error::Error>> {
|
||||||
let mode = args.output;
|
let mode = args.output;
|
||||||
let mut stdout = io::BufWriter::new(io::stdout().lock());
|
let mut stdout = io::LineWriter::new(io::stdout().lock());
|
||||||
let mut client = Client::connect(args.to_client_config())?;
|
let mut client = Client::connect(args.to_client_config())?;
|
||||||
|
|
||||||
let open = client.open(ClientTimestamp::now())?;
|
let open = client.open(ClientTimestamp::now())?;
|
||||||
|
|||||||
Reference in new issue
Block a user