Coverage / crates/flow/src/facts.rs 59.1%
55 of 93 lines run, 10 of 22 functions · run #187 on main · run missed
| 1 | //! What a runner measures about itself (spec §11.1, docs/jetstream.md §6): | |
| 2 | //! free disk, load and the kernel each claim, cheaply; and its speed, from | |
| 3 | //! a short fixed benchmark run at start and again while idle. | |
| 4 | | |
| 5 | use crateHome; | |
| 6 | use Facts; | |
| 7 | use Instant; | |
| 8 | ||
| 9 | /// The benchmark's time on the reference machine (Earth), in ms: a runner | |
| 10 | /// that takes as long scores 100. | |
| 11 | const REFERENCE_MS: f64 = 225.0; | |
| 12 | ||
| 13 | /// The cheap facts, with the last speed measured. | |
| 14 | 0× | |
| 15 | 0× | |
| 16 | 0× | |
| 17 | 0× | |
| 18 | 0× | |
| 19 | 0× | |
| 20 | 0× | |
| 21 | 0× | |
| 22 | 0× | |
| 23 | ||
| 24 | /// The kernel's release, as uname says. Not read from /proc: an Android | |
| 25 | /// app may not read it there, and is refused (and logged) every claim. | |
| 26 | /// None on Windows (oxygenflow#83). | |
| 27 | | |
| 28 | 1× | |
| 29 | 1× | |
| 30 | | |
| 31 | 1× | |
| 32 | 0× | |
| 33 | 1× | |
| 34 | | |
| 35 | 1× | |
| 36 | 1× | |
| 37 | 1× | |
| 38 | ||
| 39 | | |
| 40 | | |
| 41 | | |
| 42 | | |
| 43 | ||
| 44 | /// Free space for an unprivileged writer on the file system holding `path`, | |
| 45 | /// in MiB; not measured on Windows. | |
| 46 | | |
| 47 | 1× | |
| 48 | | |
| 49 | 1× | |
| 50 | 1× | |
| 51 | | |
| 52 | 1× | |
| 53 | 0× | |
| 54 | 1× | |
| 55 | 1× | |
| 56 | 1× | |
| 57 | ||
| 58 | | |
| 59 | | |
| 60 | | |
| 61 | | |
| 62 | ||
| 63 | /// The disk the files under `dir` take (their blocks, not their sizes: a | |
| 64 | /// job's disks are sparse), in MiB; links are not followed. | |
| 65 | 1× | |
| 66 | 1× | |
| 67 | 1× | |
| 68 | 2× | |
| 69 | 2× | |
| 70 | 2× | |
| 71 | 2× | |
| 72 | 0× | |
| 73 | 2× | |
| 74 | 2× | |
| 75 | 2× | |
| 76 | | |
| 77 | | |
| 78 | 1× | |
| 79 | 1× | |
| 80 | ||
| 81 | /// A process's peak resident memory (`VmHWM`), in MiB. | |
| 82 | 16× | |
| 83 | 16× | |
| 84 | 336× | |
| 85 | 16× | |
| 86 | 16× | |
| 87 | ||
| 88 | /// The 1-minute load average, times 100, from sysinfo (the kernel's own | |
| 89 | /// numbers behind /proc/loadavg, which an Android app may not read); not | |
| 90 | /// measured on Windows. | |
| 91 | | |
| 92 | | |
| 93 | | |
| 94 | | |
| 95 | ||
| 96 | | |
| 97 | 1× | |
| 98 | 1× | |
| 99 | | |
| 100 | 1× | |
| 101 | 0× | |
| 102 | 1× | |
| 103 | | |
| 104 | 1× | |
| 105 | 1× | |
| 106 | ||
| 107 | /// The benchmark, one thread: BLAKE3 over 256 MiB (spec §11.1), and a sort | |
| 108 | /// of 4 Mi pseudo-random words for the integer and memory side. Answers | |
| 109 | /// the score, 100 on the reference machine, and the time it took. | |
| 110 | 0× | |
| 111 | 0× | |
| 112 | 0× | |
| 113 | 0× | |
| 114 | 0× | |
| 115 | 0× | |
| 116 | 0× | |
| 117 | 0× | |
| 118 | 0× | |
| 119 | 0× | |
| 120 | 0× | |
| 121 | 0× | |
| 122 | 0× | |
| 123 | 0× | |
| 124 | 0× | |
| 125 | 0× | |
| 126 | 0× | |
| 127 | 0× | |
| 128 | 0× | |
| 129 | 0× | |
| 130 | 0× | |
| 131 | 0× | |
| 132 | 0× | |
| 133 | ||
| 134 | | |
| 135 | | |
| 136 | | |
| 137 | | |
| 138 | | |
| 139 | 1× | |
| 140 | 1× | |
| 141 | | |
| 142 | 1× | |
| 143 | 1× | |
| 144 | 1× | |
| 145 | 1× | |
| 146 | 1× | |
| 147 | 1× | |
| 148 | 1× | |
| 149 | 1× | |
| 150 | 1× | |
| 151 | 1× | |
| 152 | 1× | |
| 153 | 1× | |
| 154 | 1× | |
| 155 | 1× | |
| 156 | |