From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id C1988165262E; Tue, 18 Nov 2025 15:51:35 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org C1988165262E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1763470295; bh=SDXNQNy9IGtwBqoSPugt1KTAhn2RlfR0iJbXelwXZew=; h=Date:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=vcucX9JVdytWU8NYKIL/9KgHYGuKU8ZpCFCe4Gf8Xye07zNtcrlsUyfl0DQenJV6U LiG+1IxaHIdvKUuEIq/4/ncyx5jX5N3u12sMEddag7AgZnOVGmDmD+8A6Y4TVoXxku 6eMnb480qEAYBdH9V+xtH0hGB85bEOLYMhFmTPyY= Received: from send264.i.mail.ru (send264.i.mail.ru [95.163.59.103]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 4A2B0165262E for ; Tue, 18 Nov 2025 15:51:34 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 4A2B0165262E Received: by exim-smtp-88cf54d45-v6t7l with esmtpa (envelope-from ) id 1vLLBF-000000003p9-1LbC; Tue, 18 Nov 2025 15:51:33 +0300 Content-Type: multipart/alternative; boundary="------------CZ7UQpJE6D7uOyLLvorfCDqP" Message-ID: Date: Tue, 18 Nov 2025 15:51:33 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: Sergey Kaplun Cc: tarantool-patches@dev.tarantool.org References: In-Reply-To: X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD9231027FDF5B453B62EE8B76961ED7AA2001059791CB76F46182A05F5380850408B1F009846F145243DE06ABAFEAF6705757604F6C3AF68579FECF4F2BC809CD02031A3DD069C1E5A X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7BF6CFCE92D77DF21EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637AC83A81C8FD4AD23D82A6BABE6F325AC2E85FA5F3EDFCBAA7353EFBB55337566E92807B878994EEC8EEB581C6CB5D3E0D40549333AC7B033D7FF6AEFC239CA46389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C0D9442B0B5983000E8941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B64854413538E1713FCC7F00164DA146DA6F5DAA56C3B73B237318B6A418E8EAB8D32BA5DBAC0009BE9E8FC8737B5C2249CB3CB8E9EF962DC476E601842F6C81A12EF20D2F80756B5FB606B96278B59C4276E601842F6C81A127C277FBC8AE2E8BE270C32E94023BD73AA81AA40904B5D99C9F4D5AE37F343AD1F44FA8B9022EA23BBE47FD9DD3FB595F5C1EE8F4F765FC72CEEB2601E22B093A03B725D353964B0B7D0EA88DDEDAC722CA9DD8327EE4930A3850AC1BE2E735BA6625F88748EAEFC4224003CC83647689D4C264860C145E X-C1DE0DAB: 0D63561A33F958A55647420B7ED4DD5A5002B1117B3ED696677F55F7E4F5511230C8F815570A3530823CB91A9FED034534781492E4B8EEADA2D5570B22232E1EBDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0ADBF74143AD284FC7177DD89D51EBB7742424CF958EAFF5D571004E42C50DC4CA955A7F0CF078B5EC49A30900B95165D34A5BF8FA0BD61F994A7C5DC1D5D34F7051521C139DDC66702099873BFFFAB12BD4A7EE0D6E1A459FB1D7E09C32AA3244CCF5AE3A39EB7A42777DD89D51EBB7742683DB38D6320670DEA455F16B58544A2E30DDF7C44BCB90DA5AE236DF995FB59978A700BF655EAEEED6A17656DB59BCAD427812AF56FC65B X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu53w8ahmwBjZKM/YPHZyZHvz5uv+WouB9+ObcCpyrx6l7KImUglyhkEat/+ysWwi0gdhEs0JGjl6ggRWTy1haxBpVdbIX1nthFXMZebaIdHP2ghjoIc/363UZI6Kf1ptIMVfFX+FmbwDW1cuhaBfknZto= X-Mailru-Sender: C4F68CFF4024C8867DFDF7C7F25884588F3C2B4C50139F0A504BCEC120683F150A0FE4D08A1D63597BFAD2062C45D6D6645D15D82EE4B272BD6E4642A116CA93524AA66B5ACBE6721EF430B9A63E2A504198E0F3ECE9B5443453F38A29522196 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v1 luajit 40/41] perf: provide CMake option to setup the benchmark X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Sergey Bronnikov via Tarantool-patches Reply-To: Sergey Bronnikov Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" This is a multi-part message in MIME format. --------------CZ7UQpJE6D7uOyLLvorfCDqP Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi, Sergey, thanks for the patch! See my comments. Sergey On 10/24/25 14:00, Sergey Kaplun wrote: > This patch introduces the `LUAJIT_BENCH_INIT` option to determine the it is actually a runner for benchmark, not a command that runs before the benchmark itself. Please rephrase. I would rename a cmake option appropriately. LUAJIT_BENCH_EXEC/LUAJIT_BENCH_RUNNER? Feel free to keep as is, I don't insist. > shell command 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 68e561fd..c315597f 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() this message is not necessary, one can see it in "ctest -V" output > + > 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}") --------------CZ7UQpJE6D7uOyLLvorfCDqP Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Hi, Sergey,

thanks for the patch! See my comments.

Sergey

On 10/24/25 14:00, Sergey Kaplun wrote:
This patch introduces the `LUAJIT_BENCH_INIT` option to determine the

it is actually a runner for benchmark, not a command that runs before the benchmark itself.

Please rephrase.


I would rename a cmake option appropriately. LUAJIT_BENCH_EXEC/LUAJIT_BENCH_RUNNER?

Feel free to keep as is, I don't insist.

shell command 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 68e561fd..c315597f 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()
this message is not necessary, one can see it in "ctest -V" output
+
 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}")
--------------CZ7UQpJE6D7uOyLLvorfCDqP--