tiny.bench.IndexedMemoryTotals
Defined in tiny.bench.
Source
Source: lib/bench/src/stats/totals.zig:39
zig
pub fn IndexedMemoryTotals(comptime count: usize) type { return struct { alloc_count_total: [count]u128 = @as([count]u128, @splat(0)), free_count_total: [count]u128 = @as([count]u128, @splat(0)), alloc_bytes_total: [count]u128 = @as([count]u128, @splat(0)), pub fn record( self: *@This(), index: usize, alloc_count: u64, free_count: u64, alloc_bytes: u64, ) void { std.debug.assert(index < count); self.alloc_count_total[index] += alloc_count; self.free_count_total[index] += free_count; self.alloc_bytes_total[index] += alloc_bytes; } pub fn meanAllocCount(self: *const @This(), index: usize, sample_count: u32) f64 { std.debug.assert(index < count); return meanU128(self.alloc_count_total[index], sample_count); } pub fn meanFreeCount(self: *const @This(), index: usize, sample_count: u32) f64 { std.debug.assert(index < count); return meanU128(self.free_count_total[index], sample_count); } pub fn meanAllocBytes(self: *const @This(), index: usize, sample_count: u32) f64 { std.debug.assert(index < count); return meanU128(self.alloc_bytes_total[index], sample_count); } };}Source: lib/bench/src/root.zig:98
zig
pub const IndexedMemoryTotals = stats.IndexedMemoryTotals;Also reachable as
statistics.IndexedMemoryTotals.
Audit
| Definitions | 1 |
|---|---|
| Public names | 2 |
| Members | 0 |
| Version | 26.7.0 |
| Revision | daab053ee433 |