aboutsummaryrefslogtreecommitdiff
path: root/src/json/bench_json.c
blob: 1aeecf0440bc00a75382a7a820f2c88f66796a0c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

#include "../std/memory.h"
#include "../std/testing.h"
#include "../std/types.h"
#include "json.h"

#define BENCH_FILE "descriptive-1MB.json"

static MemoryFile json_parse_input;

static void setup_json_parse(Arena *a) {
    json_parse_input = load_file(a, BENCH_FILE);
}

i32 bench_json_parse(Arena *a) {
    JSON_parse(a, json_parse_input.content, json_parse_input.size);
    return 0;
}