query_runtime/metrics/
memory.rs1use super::QueryMetrics;
2
3impl QueryMetrics {
4 pub fn record_device_memory_observation(&mut self, bytes: u64) {
6 self.peak_device_memory_bytes = Some(self.peak_device_memory_bytes.map_or(bytes, |peak| peak.max(bytes)));
7 self.resident_dataframe_peak_bytes =
8 Some(self.resident_dataframe_peak_bytes.map_or(bytes, |peak| peak.max(bytes)));
9 }
10
11 pub fn record_allocator_high_water_bytes(&mut self, bytes: u64) {
15 self.allocator_high_water_bytes = Some(self.allocator_high_water_bytes.map_or(bytes, |peak| peak.max(bytes)));
16 }
17}