Priority-aware variant of [`read_files`]. Identical to `read_files` but records IO wait time in `metrics` under the bucket corresponding to `priority`: - `Background` / `Normal` → `TIER_LOW` - `High` → `TIER_HIGH` - `Critical` → `TIER_CRITICAL` The wait clock starts just before the first SQE submission and stops after all CQEs are reaped. File open + buffer setup
(
&mut self,
paths: &[&Path],
priority: Priority,
metrics: &IoMetrics,
)
| 256 | /// after all CQEs are reaped. File open + buffer setup time is included |
| 257 | /// because it reflects the total latency seen by the caller. |
| 258 | pub fn read_files_with_priority( |
| 259 | &mut self, |
| 260 | paths: &[&Path], |
| 261 | priority: Priority, |
| 262 | metrics: &IoMetrics, |
| 263 | ) -> Vec<Vec<u8>> { |
| 264 | let tier = match priority { |
| 265 | Priority::Background | Priority::Normal => TIER_LOW, |
| 266 | Priority::High => TIER_HIGH, |
| 267 | Priority::Critical => TIER_CRITICAL, |
| 268 | }; |
| 269 | let t0 = Instant::now(); |
| 270 | let result = self.read_files(paths); |
| 271 | let wait_ns = t0.elapsed().as_nanos() as u64; |
| 272 | metrics.record_wait(tier, wait_ns); |
| 273 | result |
| 274 | } |
| 275 | } |
| 276 | |
| 277 | /// Tracks which buffer a read uses. |
no test coverage detected