diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-04-08 14:41:33 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-04-08 14:41:33 +0200 |
| commit | 1a7efd92e7caee5dc6493190ba0915dfd88fa7bb (patch) | |
| tree | 547b7604889dc8865e4daac1fcb6474fc624f1fc /src/json | |
| parent | bde04c0f3399d40f8e0499328f61613d36deced6 (diff) | |
Benchmark framework
Diffstat (limited to 'src/json')
| -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; +} |
