From 1a7efd92e7caee5dc6493190ba0915dfd88fa7bb Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Wed, 8 Apr 2026 14:41:33 +0200 Subject: Benchmark framework --- src/json/bench_json.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/json/bench_json.c (limited to 'src/json') 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; +} -- cgit v1.3