| 1180 | } |
| 1181 | |
| 1182 | FileExpertSource::IoCounters FileExpertSource::io_counters() const { |
| 1183 | IoCounters c; |
| 1184 | c.cached_bytes = io_cached_.load(std::memory_order_relaxed); |
| 1185 | c.uncached_bytes = io_uncached_.load(std::memory_order_relaxed); |
| 1186 | c.pread_bytes = io_pread_bytes_.load(std::memory_order_relaxed); |
| 1187 | c.pread_us = io_pread_us_.load(std::memory_order_relaxed); |
| 1188 | c.pread_n = io_pread_n_.load(std::memory_order_relaxed); |
| 1189 | c.pf_jobs = io_pf_jobs_.load(std::memory_order_relaxed); |
| 1190 | c.pf_demand = io_pf_demand_.load(std::memory_order_relaxed); |
| 1191 | c.pf_read_blobs = io_pf_blobs_.load(std::memory_order_relaxed); |
| 1192 | c.pf_resident_skips = io_pf_skips_.load(std::memory_order_relaxed); |
| 1193 | c.pf_dropped = io_pf_dropped_.load(std::memory_order_relaxed); |
| 1194 | c.pf_used = io_pf_used_.load(std::memory_order_relaxed); |
| 1195 | c.pf_unused = io_pf_unused_.load(std::memory_order_relaxed); |
| 1196 | c.crit_us = io_crit_us_.load(std::memory_order_relaxed); |
| 1197 | c.crit_n = io_crit_n_.load(std::memory_order_relaxed); |
| 1198 | c.pf_bytes = io_pf_bytes_.load(std::memory_order_relaxed); |
| 1199 | c.pf_used_bytes = io_pf_used_bytes_.load(std::memory_order_relaxed); |
| 1200 | c.pf_late = io_pf_late_.load(std::memory_order_relaxed); |
| 1201 | c.pf_rej_conf = io_pf_rej_conf_.load(std::memory_order_relaxed); |
| 1202 | c.pf_rej_budget = io_pf_rej_budget_.load(std::memory_order_relaxed); |
| 1203 | if (io_sched_) { |
| 1204 | std::lock_guard<std::mutex> lk(const_cast<std::mutex&>(io_mu_)); |
| 1205 | c.pf_budget_bytes = io_budget_now(); |
| 1206 | } |
| 1207 | return c; |
| 1208 | } |
| 1209 | |
| 1210 | // 149-prefetch: the speculative bytes a decode window may read ahead. Fixed (STRATA_IO_PF_BUDGET_MB), or what the workers |
| 1211 | // measured they can read in one window (one worker's rate x the workers x the window's time) times STRATA_IO_PF_BUDGET_FRAC; |