tiny.bench.IndexedDeltaTotals
Defined in tiny.bench.
Source
Source: lib/bench/src/stats/totals.zig:3
zig
pub fn IndexedDeltaTotals(comptime count: usize) type { return struct { before_total: [count]u128 = @as([count]u128, @splat(0)), after_total: [count]u128 = @as([count]u128, @splat(0)), delta_total: [count]i128 = @as([count]i128, @splat(0)), pub fn record( self: *@This(), index: usize, before: u64, after: u64, delta: i128, ) void { std.debug.assert(index < count); self.before_total[index] += before; self.after_total[index] += after; self.delta_total[index] += delta; } pub fn meanBefore(self: *const @This(), index: usize, sample_count: u32) f64 { std.debug.assert(index < count); return meanU128(self.before_total[index], sample_count); } pub fn meanAfter(self: *const @This(), index: usize, sample_count: u32) f64 { std.debug.assert(index < count); return meanU128(self.after_total[index], sample_count); } pub fn meanDelta(self: *const @This(), index: usize, sample_count: u32) f64 { std.debug.assert(index < count); return meanI128(self.delta_total[index], sample_count); } };}Source: lib/bench/src/root.zig:97
zig
pub const IndexedDeltaTotals = stats.IndexedDeltaTotals;Also reachable as
statistics.IndexedDeltaTotals.
Audit
| Definitions | 1 |
|---|---|
| Public names | 2 |
| Members | 0 |
| Version | 26.7.0 |
| Revision | daab053ee433 |