// pub fn main() !void {
// var gpa = std.heap.GeneralPurposeAllocator(.{}){};
// var arena = std.heap.ArenaAllocator.init(gpa.allocator());
// defer arena.deinit();
// var sl = try SL.init(arena.allocator(), BENCH_SKIP_SIZE, BENCH_ITEMS);
// defer sl.deinit();
// var rand = std.rand.DefaultPrng.init(@intCast(u64, std.time.milliTimestamp()));
// const rnd = rand.random();
// var batch = std.event.Batch(anyerror!void, THREADS, .auto_async).init();
// // var frames: [BENCH_ITEMS]@Frame(testInsert) = undefined;
// var frames = try std.ArrayList(@Frame(testInsert)).initCapacity(arena.allocator(), BENCH_ITEMS);
// defer frames.deinit();
// var timer = try std.time.Timer.start();
// var job: usize = 0;
// while (job < BENCH_ITEMS) : (job += 1) {
// const key = rnd.intRangeAtMostBiased(BENCH_KEY, std.math.minInt(BENCH_KEY), std.math.maxInt(BENCH_KEY));
// // frames[job] = async testInsert(&sl, key, {});
// // batch.add(&frames[job]);
// const frame = async testInsert(&sl, key, {});
// frames.appendAssumeCapacity(frame);
// batch.add(&frames.items[job]);
// }
// try batch.wait();
// std.debug.print("Total time: {d} ms\n", .{timer.read() / std.time.ns_per_ms});
// }
fn testInsert(skiplist: *SL, key: BENCH_KEY, val: BENCH_VALUE) anyerror!void {
if (@call(.{}, skiplist.insert, .{ key, val })) {
// std.debug.print("Adding {d} done.\n", .{key});
return;
} else |err| return err;
}