Skip to documentation
SLOP

tiny.sql.History.ByteRange

Reference tiny.sql History ByteRange

Defined in History.

API (9)

Actions

Public operations.

Types and contracts

Public types and contracts.

No direct callersNo direct callsHistoryByteRange
Static calls · unresolved targets: unknown · external targets: unknown.

Source

Source: lib/sql/src/history/store.zig:127

zig
pub const ByteRange = struct {        pub const Count = u64;        pub const unit_precision_bytes: Count = 1;        pub const maximum_units_per_second: Count = 512 * 1024 * 1024;        pub const maximum_seconds_per_year: Count = 366 * 24 * 60 * 60;        pub const service_lifetime_years: Count = 1_000;        pub const service_lifetime_seconds: Count =            maximum_seconds_per_year * service_lifetime_years;        pub const maximum_append_bytes: Count =            @as(Count, record_mod.record_header_size) + std.math.maxInt(u32);        pub const budget_bytes: Count = total(            maximum_units_per_second,            service_lifetime_seconds,        ).?;        pub fn total(            units_per_second: Count,            lifetime_seconds: Count,        ) ?Count {            const bytes_per_second = std.math.mul(                Count,                unit_precision_bytes,                units_per_second,            ) catch return null;            return std.math.mul(Count, bytes_per_second, lifetime_seconds) catch null;        }    };

Also reachable as

history.History.ByteRange.

Audit

Definitions10
Public names20
Members0
Version26.7.0
Revisiondaab053ee433