~alva/scratchy

b028556159c3fac3c0ff51107d3e7214c8931706 — ugla 6 months ago edb328a
Avoid first, inaccurate run
1 files changed, 3 insertions(+), 3 deletions(-)

M src/linux.zig
M src/linux.zig => src/linux.zig +3 -3
@@ 22,8 22,8 @@ const DiskStatsArray = std.BoundedArray(DiskStats, N_DISKS_SHOULD_BE_ENOUGH_FOR_
const UPDATE_FREQ_NS = std.time.ns_per_s / 10;

const Total = struct {
    reads: u64 = 0,
    writes: u64 = 0,
    reads: u64 = std.math.maxInt(u64),
    writes: u64 = std.math.maxInt(u64),
};

pub fn crackle() !void {


@@ 80,7 80,7 @@ fn processStats(stats: *DiskStatsArray, total: *Total, prng: anytype) !void {
        reads_total += s.reads_completed;
    }

    const wd = writes_total -| total.writes -| 8;
    const wd = writes_total -| total.writes;
    const rd = reads_total -| total.reads;

    if (0 < wd + rd) {