From 170921f8c21b498ed9a497c52931e72e791f2fd9 Mon Sep 17 00:00:00 2001 From: TazyFoundSoup Date: Tue, 5 May 2026 20:01:04 +1000 Subject: feat(png): add benchmark markers to png decoding --- bench/bench.h | 17 +++++++---------- bench/src/format/image/png.c | 6 ++++++ 2 files changed, 13 insertions(+), 10 deletions(-) create mode 100644 bench/src/format/image/png.c (limited to 'bench') diff --git a/bench/bench.h b/bench/bench.h index 9496df9..fc226d9 100644 --- a/bench/bench.h +++ b/bench/bench.h @@ -24,18 +24,15 @@ typedef struct { // These need to be inline so they are fast -static inline ff_bench ff_bench_start(const char* label) { - ff_bench b; - b.label = label; - b._start = clock(); - b._end = 0; - - // Markers - b._mcount = 0; - - return b; +static inline void ff_bench_start(ff_bench *b, const char* label) { + b->label = label; + b->_start = clock(); + b->_end = 0; + b->_mcount = 0; + } + static inline void ff_bench_end(ff_bench *b) { b->_end = clock(); } diff --git a/bench/src/format/image/png.c b/bench/src/format/image/png.c new file mode 100644 index 0000000..016f686 --- /dev/null +++ b/bench/src/format/image/png.c @@ -0,0 +1,6 @@ +#include "bench.h" + +int main(void) +{ + +} -- cgit v1.2.3