Applies finishing actions to a [`RowCollection`], and reports the total time it took to run. Returns a [`RowCollectionIter`] that contains all of the response data, as well as the size of the response in bytes.
(
&self,
rows: RowCollection,
max_result_size: u64,
max_returned_query_size: Option<u64>,
duration_histogram: &Histogram,
)
| 3590 | /// Returns a [`RowCollectionIter`] that contains all of the response data, as |
| 3591 | /// well as the size of the response in bytes. |
| 3592 | pub fn finish( |
| 3593 | &self, |
| 3594 | rows: RowCollection, |
| 3595 | max_result_size: u64, |
| 3596 | max_returned_query_size: Option<u64>, |
| 3597 | duration_histogram: &Histogram, |
| 3598 | ) -> Result<(RowCollectionIter, usize), String> { |
| 3599 | let now = Instant::now(); |
| 3600 | let result = self.finish_inner(rows, max_result_size, max_returned_query_size); |
| 3601 | let duration = now.elapsed(); |
| 3602 | duration_histogram.observe(duration.as_secs_f64()); |
| 3603 | |
| 3604 | result |
| 3605 | } |
| 3606 | |
| 3607 | /// Implementation for [`RowSetFinishing::finish`]. |
| 3608 | fn finish_inner( |