alamb commented on code in PR #18085:
URL: https://github.com/apache/datafusion/pull/18085#discussion_r2437066153


##########
datafusion-cli/src/object_storage/instrumented.rs:
##########
@@ -256,35 +264,165 @@ impl fmt::Display for RequestDetails {
     }
 }
 
-/// Summary statistics for an [`InstrumentedObjectStore`]'s [`RequestDetails`]
+/// Summary statistics for all requests recorded in an 
[`InstrumentedObjectStore`]
 #[derive(Default)]
-pub struct RequestSummary {
-    count: usize,
-    duration_stats: Option<Stats<Duration>>,
-    size_stats: Option<Stats<usize>>,
+pub struct RequestSummaries {
+    summaries: Vec<RequestSummary>,
 }
 
-impl RequestSummary {
-    /// Generates a set of [RequestSummaries](RequestSummary) from the input 
[`RequestDetails`]
-    /// grouped by the input's [`Operation`]
-    pub fn summarize_by_operation(
-        requests: &[RequestDetails],
-    ) -> HashMap<Operation, Self> {
-        let mut summaries: HashMap<Operation, Self> = HashMap::new();
+/// Display the summary as a table
+impl fmt::Display for RequestSummaries {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        let batch = self.to_batch();
+        write!(f, "{}", pretty_format_batches(&[batch]).unwrap())

Review Comment:
   in 
[5d029d5](https://github.com/apache/datafusion/pull/18085/commits/5d029d5ddeedca3dbcbe9bdc6e08a957dcfd92a0)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to