Skip to content

Commit

Permalink
tree_fuzz: use stdx.div_ceil
Browse files Browse the repository at this point in the history
  • Loading branch information
matklad committed May 2, 2024
1 parent 93d2916 commit 72ebbcf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lsm/tree_fuzz.zig
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ const tree_options = .{
// Every `lsm_batch_multiple` batches may put/remove `value_count_max` values.
// Every `FuzzOp.put` issues one remove and one put.
const puts_since_compact_max = @divTrunc(commit_entries_max, 2);
const compacts_per_checkpoint = std.math.divCeil(
const compacts_per_checkpoint = stdx.div_ceil(
usize,
constants.journal_slot_count,
constants.lsm_batch_multiple,
) catch unreachable;
);

fn EnvironmentType(comptime table_usage: TableUsage) type {
return struct {
Expand Down Expand Up @@ -645,11 +645,11 @@ const Model = struct {
table_usage: TableUsage,

fn init(table_usage: TableUsage) !Model {
const model_node_count = std.math.divCeil(
const model_node_count = stdx.div_ceil(
u32,
events_max * @sizeOf(Value),
NodePool.node_size,
) catch unreachable;
);
return .{
.array = try Array.init(allocator),
.node_pool = try NodePool.init(allocator, model_node_count),
Expand Down

0 comments on commit 72ebbcf

Please sign in to comment.