diff --git a/cmd/zfs_object_agent/zettaobject/src/object_access.rs b/cmd/zfs_object_agent/zettaobject/src/object_access.rs index 65819e07c885..111086a29981 100644 --- a/cmd/zfs_object_agent/zettaobject/src/object_access.rs +++ b/cmd/zfs_object_agent/zettaobject/src/object_access.rs @@ -264,11 +264,13 @@ impl ObjectAccess { let begin = Instant::now(); let mut v = Vec::with_capacity(usize::try_from(output.content_length.unwrap_or(0)).unwrap()); + let mut count = 0; match output .body .unwrap() .try_for_each(|b| { v.extend_from_slice(&b); + count += 1; future::ready(Ok(())) }) .await @@ -279,9 +281,10 @@ impl ObjectAccess { } Ok(_) => { debug!( - "{}: got {} bytes of data in {}ms", + "{}: got {} bytes of data in {} chunks in {}ms", msg, v.len(), + count, begin.elapsed().as_millis() ); Ok(v)