Skip to content

Commit

Permalink
client: print goodput
Browse files Browse the repository at this point in the history
  • Loading branch information
mxinden committed Mar 1, 2024
1 parent 514e0ac commit 28bed42
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions neqo-client/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -478,11 +478,11 @@ impl StreamHandler for DownloadStreamHandler {
}
return Ok(true);
} else if !output_read_data {
qinfo!("READ[{stream_id}]: {sz} bytes");
println!("READ[{stream_id}]: {sz} bytes");
} else if let Ok(txt) = String::from_utf8(data.clone()) {
qinfo!("READ[{stream_id}]: {txt}");
println!("READ[{stream_id}]: {txt}");
} else {
qinfo!("READ[{}]: 0x{}", stream_id, hex(&data));
println!("READ[{}]: 0x{}", stream_id, hex(&data));
}

if fin && self.out_file.is_none() {
Expand Down Expand Up @@ -520,7 +520,7 @@ impl StreamHandler for UploadStreamHandler {
let parsed: usize = trimmed_txt.parse().unwrap();
if parsed == self.data.len() {
let upload_time = Instant::now().duration_since(self.start);
qinfo!("Stream ID: {stream_id:?}, Upload time: {upload_time:?}");
println!("Stream ID: {stream_id:?}, Upload time: {upload_time:?}");
}
} else {
panic!("Unexpected data [{}]: 0x{}", stream_id, hex(&data));
Expand Down Expand Up @@ -1150,9 +1150,9 @@ mod old {
if let Some(out_file) = maybe_out_file {
out_file.write_all(&data[..sz])?;
} else if !output_read_data {
qinfo!("READ[{stream_id}]: {sz} bytes");
println!("READ[{stream_id}]: {sz} bytes");
} else {
qinfo!(
println!(
"READ[{}]: {}",
stream_id,
String::from_utf8(data.clone()).unwrap()
Expand Down

0 comments on commit 28bed42

Please sign in to comment.