nuttx-apps/testing
Justin Hammond d4fd491f5a testing/libc/arch_libc: Add a throughput benchmark.
The existing speed checks time one call at one size, 128 bytes, with both
operands aligned.  A machine implementation usually takes its wide path
only when the pointers satisfy some alignment condition, so that single
point reports the best case and says nothing about the rest of the input
space.

Measure the same functions across a size sweep and every source and
destination alignment pair instead, plus strlcpy.  On rv64 the difference
this exposes is not marginal:

  strcpy    32768 B  s+0/d+0     2938.0 MB/s
  strcpy    32768 B  s+1/d+1     2942.0 MB/s
  strcpy    32768 B  s+1/d+2      626.0 MB/s
  memcmp    32768 B  s+0/d+0      412.4 MB/s
  memcmp    32768 B  s+1/d+2       41.0 MB/s

Two pointers misaligned by the same amount run at the aligned rate;
misaligned by different amounts they fall to a tenth of it.  Neither
number is visible from an aligned measurement alone.

A function with no machine implementation reports the same rate at every
alignment, so the sweep also shows which of them a machine directory
actually covers.

Each result reports MB/s, which compares across machines, and cycles per
byte where perf_gettime() is reachable from an application, both from one
timed loop.  strcat starts from an empty destination on each turn, since
appending to the last result would grow it without bound, so its figure
includes that store.

It sits behind TESTING_ARCH_LIBC_BENCH, default n, because a measurement
runs for a fixed interval and a full sweep takes about a minute.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Justin Hammond <justin@dynam.ac>
2026-08-18 15:27:07 -03:00
..
arch apps/testing: move himem_test,mtetest and x86-64-ABI folders to the new arhc folder 2025-01-20 17:48:48 +08:00
cmocka cmake: Use NUTTX(_DIR/_BINARY_DIR) instead of CMAKE(_SOURCE_DIR/BINARY_DIR) 2026-08-09 10:43:01 -03:00
crypto !fsutils/passwd: Replace TEA with PBKDF2-HMAC-SHA256 2026-07-22 17:21:22 +08:00
cxx apps: Fix minor issues for latest toolchains 2026-01-23 10:00:52 +08:00
cxx-oot-build testing/cxx-oot-build: Exclude cxx-oot-build in CMake projects. 2025-10-15 14:34:32 +08:00
drivers testing/drivers/crypto: Fix Kconfig style 2026-08-11 15:38:46 -04:00
enet apps/testing: add cmock_test for enet in order to test send and receive pkt 2025-12-29 22:30:56 +08:00
fff cmake: Use NUTTX(_DIR/_BINARY_DIR) instead of CMAKE(_SOURCE_DIR/BINARY_DIR) 2026-08-09 10:43:01 -03:00
fs testing/ostest: Split the fork test into vfork and fork. 2026-08-14 07:46:54 -03:00
libc testing/libc/arch_libc: Add a throughput benchmark. 2026-08-18 15:27:07 -03:00
ltp testing/ostest: Split the fork test into vfork and fork. 2026-08-14 07:46:54 -03:00
mm cmake: Use NUTTX(_DIR/_BINARY_DIR) instead of CMAKE(_SOURCE_DIR/BINARY_DIR) 2026-08-09 10:43:01 -03:00
nettest testing: nettest: Fix TCP server terminator bounds 2026-07-09 09:27:28 +08:00
nuts testing/nuts: NuttX Unit Test Selection (NUTS) application. 2025-12-28 10:28:14 +08:00
ostest system/sudo: add setuid privilege helper 2026-08-17 09:06:13 -03:00
sched testing/sched: fix off-by-one sample count in timerjitter 2026-07-11 12:31:24 -03:00
sig_sp_test testing/sig_sp_test: add test for SP context restore on signal return 2026-06-22 10:21:40 -03:00
testsuites apps: Fix O_ACCMODE bitmask checks after Linux flag alignment 2026-06-30 12:19:58 -04:00
unity cmake: Use NUTTX(_DIR/_BINARY_DIR) instead of CMAKE(_SOURCE_DIR/BINARY_DIR) 2026-08-09 10:43:01 -03:00
.gitignore Ensure all source code end with one and only one newline 2020-02-09 08:14:49 -06:00
CMakeLists.txt testing/cxx-oot-build: Exclude cxx-oot-build in CMake projects. 2025-10-15 14:34:32 +08:00
Make.defs testing: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
Makefile testing: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00