diff options
| author | Feng Jiang <jiangfeng@kylinos.cn> | 2026-04-03 19:28:47 -0600 |
|---|---|---|
| committer | Paul Walmsley <pjw@kernel.org> | 2026-04-04 18:42:44 -0600 |
| commit | 0020240a431187628e2636284023e63b9b7a2aa1 (patch) | |
| tree | 748336a93ac85823067348909055f2b3a84806fd /include/linux/timerqueue.h | |
| parent | 27b2810a4a3dcd1545ec8bafc82f967eda591c47 (diff) | |
lib/string_kunit: add performance benchmark for strlen()
Introduce a benchmarking framework to the string_kunit test suite to
measure the execution efficiency of string functions.
The implementation is inspired by crc_benchmark(), measuring throughput
(MB/s) and latency (ns/call) across a range of string lengths. It
includes a warm-up phase, disables preemption during measurement, and
uses a fixed seed for reproducible results.
This framework allows for comparing different implementations (e.g.,
generic C vs. architecture-optimized assembly) within the KUnit
environment.
Initially, provide a benchmark for strlen().
Suggested-by: Andy Shevchenko <andy@kernel.org>
Suggested-by: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Feng Jiang <jiangfeng@kylinos.cn>
Reviewed-by: Kees Cook <kees@kernel.org>
Link: https://patch.msgid.link/20260130025018.172925-5-jiangfeng@kylinos.cn
[pjw@kernel.org: fixed a checkpatch issue]
Signed-off-by: Paul Walmsley <pjw@kernel.org>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions
