[Tarantool-patches] [PATCH v2 luajit 40/41] perf: provide CMake option to setup the benchmark
Sergey Bronnikov
sergeyb at tarantool.org
Tue Jan 13 18:30:44 MSK 2026
LGTM
On 12/26/25 12:18, Sergey Kaplun wrote:
> This patch introduces the `LUAJIT_BENCH_INIT` option to determine the
> shell command prefix to be run before the benchmark itself. It may be
> useful to set taskset, etc.
> ---
> perf/CMakeLists.txt | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/perf/CMakeLists.txt b/perf/CMakeLists.txt
> index b6e98808..5a5cf777 100644
> --- a/perf/CMakeLists.txt
> +++ b/perf/CMakeLists.txt
> @@ -7,6 +7,13 @@ if(CMAKE_BUILD_TYPE STREQUAL "Debug")
> "Timings may be affected.")
> endif()
>
> +# The shell command needs to be run before benchmarks are started.
> +if(LUAJIT_BENCH_INIT)
> + message(STATUS
> + "The following command will run before benchmarks: '${LUAJIT_BENCH_INIT}'."
> + )
> +endif()
> +
> set(PERF_OUTPUT_DIR ${PROJECT_BINARY_DIR}/perf/output)
> file(MAKE_DIRECTORY ${PERF_OUTPUT_DIR})
>
> @@ -51,7 +58,7 @@ macro(AddBench bench_name bench_path perf_suite LUA_PATH)
> set(bench_out_file
> ${PERF_OUTPUT_DIR}/${perf_suite}/${bench_name_stripped}.json
> )
> - set(bench_command "${LUAJIT_BINARY} ${bench_path}")
> + set(bench_command "${LUAJIT_BENCH_INIT} ${LUAJIT_BINARY} ${bench_path}")
> if(${ARGC} GREATER 4)
> set(input_file ${ARGV4})
> set(bench_command "${bench_command} < ${input_file}")
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.tarantool.org/pipermail/tarantool-patches/attachments/20260113/61a167a4/attachment.htm>
More information about the Tarantool-patches
mailing list