From: Sergey Bronnikov via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Sergey Kaplun <skaplun@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH v2 luajit 37/41] perf: add CMake infrastructure
Date: Thu, 15 Jan 2026 10:47:04 +0300 [thread overview]
Message-ID: <eced8f08-2c25-44a6-881f-1c358f1aec13@tarantool.org> (raw)
In-Reply-To: <aWdY255lKRAdui3C@root>
[-- Attachment #1: Type: text/plain, Size: 6384 bytes --]
Hi, Sergey!
LGTM
On 1/14/26 11:50, Sergey Kaplun wrote:
> Hi, Sergey!
> Fixed your comments, see the iterative patches below.
>
> On 13.01.26, Sergey Bronnikov wrote:
>> Hi, Sergey!
>>
>> thanks for the patch! LGTM in general, see my comments below.
>>
>> Sergey
>>
>> On 12/26/25 12:18, Sergey Kaplun wrote:
> <snipped>
>
>>> +macro(AddBenchTarget perf_suite)
>>> + file(MAKE_DIRECTORY "${PERF_OUTPUT_DIR}/${perf_suite}/")
>>> + message(STATUS "Add perf suite ${perf_suite}")
>>> + add_custom_target(${perf_suite})
>>> + add_custom_target(${perf_suite}-console
>>> + COMMAND ${CMAKE_CTEST_COMMAND}
>>> + -L ${perf_suite}
>> use long option "--label-regex" instead "-L"
> Fixed:
> ===================================================================
> diff --git a/perf/CMakeLists.txt b/perf/CMakeLists.txt
> index 06603dfd..d03d74a0 100644
> --- a/perf/CMakeLists.txt
> +++ b/perf/CMakeLists.txt
> @@ -47,7 +47,7 @@ macro(AddBenchTarget perf_suite)
> add_custom_target(${perf_suite})
> add_custom_target(${perf_suite}-console
> COMMAND ${CMAKE_CTEST_COMMAND}
> - -L ${perf_suite}
> + --label-regex ${perf_suite}
> --parallel 1
> --verbose
> --output-on-failure
> ===================================================================
>
>>> + --parallel 1
>>> + --verbose
>>> + --output-on-failure
>>> + --no-tests=error
>>> + )
>>> + add_dependencies(${perf_suite}-console luajit-main)
>>> +endmacro()
>>> +
>>> +# Add the bench to the pair of targets created by the call above.
>>> +macro(AddBench bench_name bench_path perf_suite LUA_PATH)
>>> + set(bench_title "perf/${perf_suite}/${bench_name}")
>>> + get_filename_component(bench_name_stripped ${bench_name} NAME_WE)
>>> + set(bench_out_file
>>> + ${PERF_OUTPUT_DIR}/${perf_suite}/${bench_name_stripped}.json
>>> + )
>>> + set(bench_command "${LUAJIT_BINARY} ${bench_path}")
>>> + if(${ARGC} GREATER 4)
>>> + set(input_file ${ARGV4})
>>> + set(bench_command "${bench_command} < ${input_file}")
>>> + endif()
>>> + set(BENCH_FLAGS
>>> + "--benchmark_out_format=json --benchmark_out=${bench_out_file}"
>> Why BENCH_FLAGS is in uppercase and bench_command_flags in lower-case?
>>
>> What is the difference?
>>
>> Also, it seems these variables are unused and can be removed:
>>
>> @ -56,10 +58,6 @@ macro(AddBench bench_name bench_path perf_suite LUA_PATH)
>> set(input_file ${ARGV4})
>> set(bench_command "${bench_command} < ${input_file}")
>> endif()
>> - set(BENCH_FLAGS
>> - "--benchmark_out_format=json --benchmark_out=${bench_out_file}"
>> - )
>> - set(bench_command_flags ${bench_command} ${BENCH_FLAGS})
>> separate_arguments(bench_command_separated UNIX_COMMAND
>> ${bench_command})
>> add_custom_command(
>> COMMAND ${CMAKE_COMMAND} -E env
>>
> Dropped, thanks!
>
> ===================================================================
> diff --git a/perf/CMakeLists.txt b/perf/CMakeLists.txt
> index 5a5cf777..0916402e 100644
> --- a/perf/CMakeLists.txt
> +++ b/perf/CMakeLists.txt
> @@ -63,10 +63,6 @@ macro(AddBench bench_name bench_path perf_suite LUA_PATH)
> set(input_file ${ARGV4})
> set(bench_command "${bench_command} < ${input_file}")
> endif()
> - set(BENCH_FLAGS
> - "--benchmark_out_format=json --benchmark_out=${bench_out_file}"
> - )
> - set(bench_command_flags ${bench_command} ${BENCH_FLAGS})
> separate_arguments(bench_command_separated UNIX_COMMAND ${bench_command})
> add_custom_command(
> COMMAND ${CMAKE_COMMAND} -E env
> ===================================================================
>
>>> + )
>>> + set(bench_command_flags ${bench_command} ${BENCH_FLAGS})
>>> + separate_arguments(bench_command_separated UNIX_COMMAND ${bench_command})
>>> + add_custom_command(
>>> + COMMAND ${CMAKE_COMMAND} -E env
>>> + LUA_PATH="${LUA_PATH}"
>>> + LUA_CPATH="${LUA_CPATH}"
>>> + ${bench_command_separated}
>>> + --benchmark_out_format=json
>>> + --benchmark_out="${bench_out_file}"
>>> + OUTPUT ${bench_out_file}
>>> + DEPENDS luajit-main
>>> + COMMENT
>>> + "Running benchmark ${bench_title} saving results in ${bench_out_file}."
>>> + )
>>> + add_custom_target(${bench_name} DEPENDS ${bench_out_file})
>>> + add_dependencies(${perf_suite} ${bench_name})
>>> +
>>> + # Report in the console.
>>> + add_test(NAME ${bench_title}
>>> + COMMAND sh -c "${bench_command}"
>> I propose to use find_program for shell executable, like we do in
>> tarantool's root cmakelists.txt:
>>
>> --- a/perf/CMakeLists.txt
>> +++ b/perf/CMakeLists.txt
>> @@ -1,5 +1,7 @@
>> # Running various bench suites against LuaJIT.
>>
>> +find_program(SHELL sh)
>> +
>> include(MakeLuaPath)
>>
>> if(CMAKE_BUILD_TYPE STREQUAL "Debug") @@ -78,7 +80,7 @@ macro(AddBench bench_name bench_path perf_suite
>> LUA_PATH) # Report in the console. add_test(NAME ${bench_title}
>> - COMMAND sh -c "${bench_command}"
>> + COMMAND ${SHELL} -c "${bench_command}"
>> )
>> set_tests_properties(${bench_title} PROPERTIES
>> ENVIRONMENT "LUA_PATH=${LUA_PATH}"
> Added:
>
> ===================================================================
> diff --git a/perf/CMakeLists.txt b/perf/CMakeLists.txt
> index 0916402e..e3af1996 100644
> --- a/perf/CMakeLists.txt
> +++ b/perf/CMakeLists.txt
> @@ -2,6 +2,11 @@
>
> include(MakeLuaPath)
>
> +find_program(SH sh)
> +if(NOT SH)
> + message(FATAL_ERROR "`sh' is not found")
> +endif()
> +
> if(CMAKE_BUILD_TYPE STREQUAL "Debug")
> message(WARNING "LuaJIT and perf tests are built in the Debug mode. "
> "Timings may be affected.") @@ -81,7 +86,7 @@ macro(AddBench bench_name bench_path perf_suite
> LUA_PATH) # Report in the console. add_test(NAME ${bench_title} -
> COMMAND sh -c "${bench_command}"
> + COMMAND ${SH} -c "${bench_command}"
> )
> set_tests_properties(${bench_title} PROPERTIES
> ENVIRONMENT "LUA_PATH=${LUA_PATH}"
> ===================================================================
>
>>> + )
>>> + set_tests_properties(${bench_title} PROPERTIES
>>> + ENVIRONMENT "LUA_PATH=${LUA_PATH}"
>>> + LABELS ${perf_suite}
>>> + DEPENDS luajit-main
>>> + )
>>> + unset(input_file)
>>> +endmacro()
>>> +
> <snipped>
>
[-- Attachment #2: Type: text/html, Size: 7808 bytes --]
next prev parent reply other threads:[~2026-01-15 7:47 UTC|newest]
Thread overview: 110+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-26 9:17 [Tarantool-patches] [PATCH v2 luajit 00/41] LuaJIT performance testing Sergey Kaplun via Tarantool-patches
2025-12-26 9:17 ` [Tarantool-patches] [PATCH v2 luajit 01/41] perf: add LuaJIT-test-cleanup perf suite Sergey Kaplun via Tarantool-patches
2025-12-29 13:28 ` Sergey Bronnikov via Tarantool-patches
2025-12-26 9:17 ` [Tarantool-patches] [PATCH v2 luajit 02/41] perf: introduce clock module Sergey Kaplun via Tarantool-patches
2025-12-29 13:55 ` Sergey Bronnikov via Tarantool-patches
2026-01-03 6:16 ` Sergey Kaplun via Tarantool-patches
2026-01-13 15:06 ` Sergey Bronnikov via Tarantool-patches
2025-12-26 9:17 ` [Tarantool-patches] [PATCH v2 luajit 03/41] perf: introduce bench module Sergey Kaplun via Tarantool-patches
2026-01-15 8:49 ` Sergey Bronnikov via Tarantool-patches
2026-01-15 10:02 ` Sergey Kaplun via Tarantool-patches
2025-12-26 9:17 ` [Tarantool-patches] [PATCH v2 luajit 04/41] perf: adjust array3d in LuaJIT-benches Sergey Kaplun via Tarantool-patches
2025-12-29 14:00 ` Sergey Bronnikov via Tarantool-patches
2026-01-03 6:20 ` Sergey Kaplun via Tarantool-patches
2025-12-26 9:17 ` [Tarantool-patches] [PATCH v2 luajit 05/41] perf: adjust binary-trees " Sergey Kaplun via Tarantool-patches
2025-12-29 14:04 ` Sergey Bronnikov via Tarantool-patches
2025-12-26 9:17 ` [Tarantool-patches] [PATCH v2 luajit 06/41] perf: adjust chameneos " Sergey Kaplun via Tarantool-patches
2025-12-29 14:18 ` Sergey Bronnikov via Tarantool-patches
2025-12-26 9:17 ` [Tarantool-patches] [PATCH v2 luajit 07/41] perf: adjust coroutine-ring " Sergey Kaplun via Tarantool-patches
2025-12-29 14:10 ` Sergey Bronnikov via Tarantool-patches
2025-12-26 9:17 ` [Tarantool-patches] [PATCH v2 luajit 08/41] perf: adjust euler14-bit " Sergey Kaplun via Tarantool-patches
2025-12-29 14:15 ` Sergey Bronnikov via Tarantool-patches
2025-12-26 9:17 ` [Tarantool-patches] [PATCH v2 luajit 09/41] perf: adjust fannkuch " Sergey Kaplun via Tarantool-patches
2025-12-29 14:17 ` Sergey Bronnikov via Tarantool-patches
2025-12-26 9:17 ` [Tarantool-patches] [PATCH v2 luajit 10/41] perf: adjust fasta " Sergey Kaplun via Tarantool-patches
2026-01-15 8:07 ` Sergey Bronnikov via Tarantool-patches
2025-12-26 9:17 ` [Tarantool-patches] [PATCH v2 luajit 11/41] perf: adjust k-nucleotide " Sergey Kaplun via Tarantool-patches
2026-01-02 10:03 ` Sergey Bronnikov via Tarantool-patches
2026-01-03 6:38 ` Sergey Kaplun via Tarantool-patches
2026-01-13 15:39 ` Sergey Bronnikov via Tarantool-patches
2025-12-26 9:17 ` [Tarantool-patches] [PATCH v2 luajit 12/41] perf: adjust life " Sergey Kaplun via Tarantool-patches
2026-01-02 10:07 ` Sergey Bronnikov via Tarantool-patches
2025-12-26 9:17 ` [Tarantool-patches] [PATCH v2 luajit 13/41] perf: adjust mandelbrot-bit " Sergey Kaplun via Tarantool-patches
2026-01-02 10:10 ` Sergey Bronnikov via Tarantool-patches
2025-12-26 9:17 ` [Tarantool-patches] [PATCH v2 luajit 14/41] perf: adjust mandelbrot " Sergey Kaplun via Tarantool-patches
2026-01-02 10:12 ` Sergey Bronnikov via Tarantool-patches
2025-12-26 9:17 ` [Tarantool-patches] [PATCH v2 luajit 15/41] perf: adjust md5 " Sergey Kaplun via Tarantool-patches
2026-01-02 10:15 ` Sergey Bronnikov via Tarantool-patches
2025-12-26 9:17 ` [Tarantool-patches] [PATCH v2 luajit 16/41] perf: adjust meteor " Sergey Kaplun via Tarantool-patches
2026-01-02 10:18 ` Sergey Bronnikov via Tarantool-patches
2025-12-26 9:17 ` [Tarantool-patches] [PATCH v2 luajit 17/41] perf: adjust nbody " Sergey Kaplun via Tarantool-patches
2026-01-02 10:55 ` Sergey Bronnikov via Tarantool-patches
2026-01-03 6:21 ` Sergey Kaplun via Tarantool-patches
2025-12-26 9:17 ` [Tarantool-patches] [PATCH v2 luajit 18/41] perf: adjust nsieve-bit-fp " Sergey Kaplun via Tarantool-patches
2026-01-15 7:58 ` Sergey Bronnikov via Tarantool-patches
2026-01-15 8:04 ` Sergey Kaplun via Tarantool-patches
2025-12-26 9:17 ` [Tarantool-patches] [PATCH v2 luajit 19/41] perf: adjust nsieve-bit " Sergey Kaplun via Tarantool-patches
2026-01-02 10:57 ` Sergey Bronnikov via Tarantool-patches
2026-01-02 11:00 ` Sergey Bronnikov via Tarantool-patches
2025-12-26 9:17 ` [Tarantool-patches] [PATCH v2 luajit 20/41] perf: adjust nsieve " Sergey Kaplun via Tarantool-patches
2026-01-02 11:01 ` Sergey Bronnikov via Tarantool-patches
2025-12-26 9:17 ` [Tarantool-patches] [PATCH v2 luajit 21/41] perf: adjust partialsums " Sergey Kaplun via Tarantool-patches
2026-01-02 11:04 ` Sergey Bronnikov via Tarantool-patches
2025-12-26 9:17 ` [Tarantool-patches] [PATCH v2 luajit 22/41] perf: adjust pidigits-nogmp " Sergey Kaplun via Tarantool-patches
2026-01-02 11:07 ` Sergey Bronnikov via Tarantool-patches
2025-12-26 9:17 ` [Tarantool-patches] [PATCH v2 luajit 23/41] perf: adjust ray " Sergey Kaplun via Tarantool-patches
2026-01-02 11:08 ` Sergey Bronnikov via Tarantool-patches
2025-12-26 9:17 ` [Tarantool-patches] [PATCH v2 luajit 24/41] perf: adjust recursive-ack " Sergey Kaplun via Tarantool-patches
2026-01-02 15:25 ` Sergey Bronnikov via Tarantool-patches
2025-12-26 9:17 ` [Tarantool-patches] [PATCH v2 luajit 25/41] perf: adjust recursive-fib " Sergey Kaplun via Tarantool-patches
2026-01-02 15:31 ` Sergey Bronnikov via Tarantool-patches
2025-12-26 9:17 ` [Tarantool-patches] [PATCH v2 luajit 26/41] perf: adjust revcomp " Sergey Kaplun via Tarantool-patches
2026-01-02 15:37 ` Sergey Bronnikov via Tarantool-patches
2026-01-03 6:28 ` Sergey Kaplun via Tarantool-patches
2026-01-13 15:37 ` Sergey Bronnikov via Tarantool-patches
2025-12-26 9:17 ` [Tarantool-patches] [PATCH v2 luajit 27/41] perf: adjust scimark-2010-12-20 " Sergey Kaplun via Tarantool-patches
2026-01-02 15:53 ` Sergey Bronnikov via Tarantool-patches
2026-01-03 6:10 ` Sergey Kaplun via Tarantool-patches
2025-12-26 9:17 ` [Tarantool-patches] [PATCH v2 luajit 28/41] perf: move <scimark_lib.lua> to <libs/> directory Sergey Kaplun via Tarantool-patches
2026-01-13 15:05 ` Sergey Bronnikov via Tarantool-patches
2025-12-26 9:18 ` [Tarantool-patches] [PATCH v2 luajit 29/41] perf: adjust scimark-fft in LuaJIT-benches Sergey Kaplun via Tarantool-patches
2026-01-02 15:58 ` Sergey Bronnikov via Tarantool-patches
2026-01-03 6:07 ` Sergey Kaplun via Tarantool-patches
2025-12-26 9:18 ` [Tarantool-patches] [PATCH v2 luajit 30/41] perf: adjust scimark-lu " Sergey Kaplun via Tarantool-patches
2026-01-02 16:01 ` Sergey Bronnikov via Tarantool-patches
2026-01-03 6:06 ` Sergey Kaplun via Tarantool-patches
2025-12-26 9:18 ` [Tarantool-patches] [PATCH v2 luajit 31/41] perf: add scimark-mc " Sergey Kaplun via Tarantool-patches
2026-01-02 16:03 ` Sergey Bronnikov via Tarantool-patches
2026-01-03 6:05 ` Sergey Kaplun via Tarantool-patches
2026-01-13 15:34 ` Sergey Bronnikov via Tarantool-patches
2025-12-26 9:18 ` [Tarantool-patches] [PATCH v2 luajit 32/41] perf: adjust scimark-sor " Sergey Kaplun via Tarantool-patches
2026-01-02 16:06 ` Sergey Bronnikov via Tarantool-patches
2026-01-03 6:04 ` Sergey Kaplun via Tarantool-patches
2026-01-13 15:34 ` Sergey Bronnikov via Tarantool-patches
2026-01-02 16:27 ` Sergey Bronnikov via Tarantool-patches
2025-12-26 9:18 ` [Tarantool-patches] [PATCH v2 luajit 33/41] perf: adjust scimark-sparse " Sergey Kaplun via Tarantool-patches
2026-01-02 16:27 ` Sergey Bronnikov via Tarantool-patches
2025-12-26 9:18 ` [Tarantool-patches] [PATCH v2 luajit 34/41] perf: adjust series " Sergey Kaplun via Tarantool-patches
2026-01-02 16:32 ` Sergey Bronnikov via Tarantool-patches
2025-12-26 9:18 ` [Tarantool-patches] [PATCH v2 luajit 35/41] perf: adjust spectral-norm " Sergey Kaplun via Tarantool-patches
2026-01-02 16:32 ` Sergey Bronnikov via Tarantool-patches
2025-12-26 9:18 ` [Tarantool-patches] [PATCH v2 luajit 36/41] perf: adjust sum-file " Sergey Kaplun via Tarantool-patches
2026-01-13 14:45 ` Sergey Bronnikov via Tarantool-patches
2026-01-13 14:47 ` Sergey Bronnikov via Tarantool-patches
2025-12-26 9:18 ` [Tarantool-patches] [PATCH v2 luajit 37/41] perf: add CMake infrastructure Sergey Kaplun via Tarantool-patches
2026-01-13 15:04 ` Sergey Bronnikov via Tarantool-patches
2026-01-14 8:50 ` Sergey Kaplun via Tarantool-patches
2026-01-15 7:47 ` Sergey Bronnikov via Tarantool-patches [this message]
2025-12-26 9:18 ` [Tarantool-patches] [PATCH v2 luajit 38/41] perf: add aggregator helper for bench statistics Sergey Kaplun via Tarantool-patches
2026-01-13 15:33 ` Sergey Bronnikov via Tarantool-patches
2025-12-26 9:18 ` [Tarantool-patches] [PATCH v2 luajit 39/41] perf: add a script for the environment setup Sergey Kaplun via Tarantool-patches
2026-01-13 15:31 ` Sergey Bronnikov via Tarantool-patches
2026-01-13 15:46 ` Sergey Kaplun via Tarantool-patches
2026-01-15 7:52 ` Sergey Bronnikov via Tarantool-patches
2025-12-26 9:18 ` [Tarantool-patches] [PATCH v2 luajit 40/41] perf: provide CMake option to setup the benchmark Sergey Kaplun via Tarantool-patches
2026-01-13 15:30 ` Sergey Bronnikov via Tarantool-patches
2025-12-26 9:18 ` [Tarantool-patches] [PATCH v2 luajit 41/41] ci: introduce the performance workflow Sergey Kaplun via Tarantool-patches
2026-01-13 15:30 ` Sergey Bronnikov via Tarantool-patches
2026-01-14 10:19 ` Sergey Kaplun via Tarantool-patches
2026-01-15 7:52 ` Sergey Bronnikov via Tarantool-patches
2026-01-15 12:28 ` [Tarantool-patches] [PATCH v2 luajit 00/41] LuaJIT performance testing Sergey Bronnikov via Tarantool-patches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=eced8f08-2c25-44a6-881f-1c358f1aec13@tarantool.org \
--to=tarantool-patches@dev.tarantool.org \
--cc=sergeyb@tarantool.org \
--cc=skaplun@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH v2 luajit 37/41] perf: add CMake infrastructure' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox