diff --git a/bench/twitter/main.zig b/bench/twitter/main.zig index 3ca686a..609967b 100644 --- a/bench/twitter/main.zig +++ b/bench/twitter/main.zig @@ -1,13 +1,15 @@ const std = @import("std"); const dom = @import("simdjzon").dom; +pub const read_buf_cap = std.mem.page_size; + pub fn main() !u8 { var arena = std.heap.ArenaAllocator.init(std.heap.page_allocator); defer arena.deinit(); const allocator = arena.allocator(); const args = try std.process.argsAlloc(allocator); - if(args.len != 2) { - std.debug.print("USAGE: ./simdjson \n", .{}); + if (args.len != 2) { + std.debug.print("USAGE: ./simdjson \n", .{}); } var parser = try dom.Parser.initFile(allocator, args[1], .{}); defer parser.deinit(); @@ -18,16 +20,16 @@ pub fn main() !u8 { const statuses = try parser.element().at_pointer("/statuses"); const array = try statuses.get_array(); var i: usize = 0; - while(array.at(i)) |status| : (i += 1) { + while (array.at(i)) |status| : (i += 1) { _ = status; // autofix - // const id = try status.at_pointer("/id"); - // std.debug.print("{}\n", .{try id.get_int64()}); + // const id = try status.at_pointer("/id"); + // std.debug.print("{}\n", .{try id.get_int64()}); } // std.debug.print("i={}\n", .{i}); if (i != 100) { - std.debug.print("error. expected i=100. found i={}\n", .{i}); - return 1; + std.debug.print("error. expected i=100. found i={}\n", .{i}); + return 1; } return 0; -} \ No newline at end of file +}