diff options
Diffstat (limited to 'src/json/bench_json.c')
| -rw-r--r-- | src/json/bench_json.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/json/bench_json.c b/src/json/bench_json.c new file mode 100644 index 0000000..1aeecf0 --- /dev/null +++ b/src/json/bench_json.c @@ -0,0 +1,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; +} |
