nuttx-apps/testing/libc/arch_libc
Justin Hammond f4d71b6074 testing/libc/arch_libc: Time against a clock that runs.
Every measurement repeats until a stated interval has passed, so a clock
that reads the same value twice does not slow the benchmark down, it stops
it returning at all.

CLOCK_MONOTONIC does not advance on every target.  On qemu-intel64 it
reports success and stays at zero, while CLOCK_REALTIME advances normally,
and the benchmark spins in its first measurement with no output after the
heading.

Sample each candidate twice around a busy wait and take the first one whose
reading changes.  Where none does, say so and skip the timing rather than
hang.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Justin Hammond <justin@dynam.ac>
2026-08-18 15:27:07 -03:00
..
arch_libc_bench.c testing/libc/arch_libc: Time against a clock that runs. 2026-08-18 15:27:07 -03:00
arch_libc_test_main.c testing/libc/arch_libc: Test memccpy and stpncpy. 2026-08-18 15:27:07 -03:00
CMakeLists.txt testing/libc/arch_libc: Add a throughput benchmark. 2026-08-18 15:27:07 -03:00
Kconfig testing/libc/arch_libc: Test memccpy and stpncpy. 2026-08-18 15:27:07 -03:00
Make.defs apps/testing:move arch_libc, fmemopen, scanftest folders to the new lib folder 2025-01-22 17:18:30 +08:00
Makefile testing/libc/arch_libc: Add a throughput benchmark. 2026-08-18 15:27:07 -03:00