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 9A2E316ADBBE; Fri, 26 Dec 2025 11:41:08 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 9A2E316ADBBE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1766738468; bh=b/UmbfK03y8TgK7Oou/w3/PPQYXIo+/oqxDZGKZezSI=; 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=dhu8tOsODkrA+cE9mqppqCTX62dTKZET+h9G/0SN4fp8cvhgc3BpZxbhwCwBF2n06 naaNosw7UxwVpM0xbROK7nMwMpskobhpXCa2nv1+sGFaSlHqhQgp/CcrPrtBgviO74 A0RYAw7PCVujfH0C6QtjwXysa2086Jim0ZR3As/k= Received: from send126.i.mail.ru (send126.i.mail.ru [89.221.237.221]) (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 E11D616ADBBA for ; Fri, 26 Dec 2025 11:41:04 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org E11D616ADBBA Received: by exim-smtp-7b4fb89df9-9wppm with esmtpa (envelope-from ) id 1vZ3Nf-000000002AG-3Dkz; Fri, 26 Dec 2025 11:41:04 +0300 Date: Fri, 26 Dec 2025 11:41:01 +0300 To: Sergey Bronnikov Cc: tarantool-patches@dev.tarantool.org Message-ID: References: <4187d8d3-4d9d-466c-869c-f3dde532c5e5@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4187d8d3-4d9d-466c-869c-f3dde532c5e5@tarantool.org> X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD979975AF0D777FEBD705C26DA7DFA1BE5FABF32B159CC9D93182A05F538085040611448B5189E8E493DE06ABAFEAF67051A6DEA280F418E5A95925BE4019C99942D7423A3730B98E4 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE731D82F3F177D3BCDEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637AC83A81C8FD4AD23D82A6BABE6F325AC2E85FA5F3EDFCBAA7353EFBB55337566657B88B02DF8C869A578C6CDCA1185C810A8E05DE66E90635CF0BB99172AE123389733CBF5DBD5E913377AFFFEAFD269A417C69337E82CC2CC7F00164DA146DAFE8445B8C89999729449624AB7ADAF37F6B57BC7E64490611E7FA7ABCAF51C92176DF2183F8FC7C07E7E81EEA8A9722B8941B15DA834481F9449624AB7ADAF372E808ACE2090B5E14AD6D5ED66289B5259CC434672EE63711DD303D21008E298D5E8D9A59859A8B6B372FE9A2E580EFC725E5C173C3A84C3C9EEE74C166EF7BC35872C767BF85DA2F004C90652538430E4A6367B16DE6309 X-C1DE0DAB: 0D63561A33F958A5FC5D869FBF78957B5002B1117B3ED696F409E8EE63AEBDEFF5FEB6EB1EB183FD823CB91A9FED034534781492E4B8EEAD8D8BB953E4894305BDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0AD73CAD6646DEDE1918E10F71CB4DF9F96AB70F9BE574AE9C625B6776AC983F447FC0B9F89525902EE6F57B2FD27647F25E66C117BDB76D659A36E900AB66CF88100784A2902F0DB07B87D0FFCF85D6DCBF72BEF843CB1CE1205CBFA800BBC7C2CB8341EE9D5BE9A0AB6045445A144641CCDF13237BB3263D07D233CC07ADE73A48CD93680B12512CF4C41F94D744909CECFA6C6B0C050A61A8CAF69B82BA93681CD72808BE417F3B9E0E7457915DAA85F X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu53w8ahmwBjZKM/YPHZyZHvz5uv+WouB9+ObcCpyrx6l7KImUglyhkEat/+ysWwi0gdhEs0JGjl6ggRWTy1haxBpVdbIX1nthFXMZebaIdHP2ghjoIc/363UZI6Kf1ptIMVdtTL5f5BIXbyUzyJZXubEs= X-Mailru-Sender: 689FA8AB762F7393DDD5FD59B456EAD2E2F09BC2107295A849D1ACB77190B9374B44B2A7240C9ED8E49D44BB4BD9522A059A1ED8796F048DB274557F927329BE89D5A3BC2B10C37545BD1C3CC395C826B4A721A3011E896F X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v1 luajit 38/41] perf: add aggregator helper for bench statistics 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 Kaplun via Tarantool-patches Reply-To: Sergey Kaplun Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi, Sergey! Thanks for the review. Fixed your comments. On 18.11.25, Sergey Bronnikov wrote: > Hi, Sergey, > > thanks for the patch! See my comments. > > Sergey > > On 10/24/25 14:00, Sergey Kaplun wrote: > > This patch adds a helper script to aggregate the benchmark results from > > JSON files to the format parsable by the InfluxDB line protocol [1]. > > format cannot be parsed by protocol, please rephrase. > > Something like "the format compatible with the InfluxDB line protocol" Rephrased as you suggested. > > > > > All JSON files from each suite in the directory are > > considered as the benchmark results and aggregated into the > > file that can be posted to the InfluxDB. The > > results are aggregated via the new target LuaJIT-perf-aggregate. > may be say that cjson is required? Added about it and git. > > > > [1]:https://docs.influxdata.com/influxdb/v2/reference/syntax/line-protocol/ The updated commit message is the following: | perf: add aggregator helper for bench statistics | | This patch adds a helper script to aggregate the benchmark results from | JSON files to the format compatible with the InfluxDB line protocol [1]. | | The script takes 2 command line arguments: | | luajit aggregate.lua output_file [input_dir] | | If `input_dir` isn't given, it uses the current directory by default. | | The script requires the `git` command or specified the `PERF_COMMIT`, | `PERF_BRANCH` environment variables. Also, it requires the `cjson` | module. | | All JSON files from each suite in the directory are | considered as the benchmark results and aggregated into the | file that can be posted to the InfluxDB. The | results are aggregated via the new target LuaJIT-perf-aggregate. | | [1]: https://docs.influxdata.com/influxdb/v2/reference/syntax/line-protocol/ > > --- > > perf/CMakeLists.txt | 13 ++++ > > perf/helpers/aggregate.lua | 124 +++++++++++++++++++++++++++++++++++++ > > 2 files changed, 137 insertions(+) > > create mode 100644 perf/helpers/aggregate.lua > > > > diff --git a/perf/CMakeLists.txt b/perf/CMakeLists.txt > > index cc3c312f..68e561fd 100644 > > --- a/perf/CMakeLists.txt > > +++ b/perf/CMakeLists.txt > > diff --git a/perf/helpers/aggregate.lua b/perf/helpers/aggregate.lua > > new file mode 100644 > > index 00000000..12a8ab89 > > --- /dev/null > > +++ b/perf/helpers/aggregate.lua > > @@ -0,0 +1,124 @@ > > +local json = require('cjson') > What if cjson is absent? Do we want to handle error? No, it is required. Mentioned it in the commit message and in the comment below as you suggested. > > + > > +-- File to aggregate the benchmark results from JSON files to the > > +-- format parsable by the InfluxDB line protocol [1]: > > +-- , > > +-- > > +-- and have the following format: > > +-- =,= > > +-- > > +-- The reported tag set is a set of values that can be used for > > +-- filtering data (i.e., branch or benchmark name). > > +-- > > +-- luacheck: push no max comment line length > > +-- > > +-- [1]:https://docs.influxdata.com/influxdb/v2/reference/syntax/line-protocol/ > > +-- > > +-- luacheck: pop > > I propose to document command-line options > > (1st arg is output file, 2nd arg is a dir, "current dir by default"), > > env variables (PERF_COMMIT, PERF_BRANCH) and requirements > > (git is an optional requirement, cjson Lua module is mandatory). Added the comment: =================================================================== diff --git a/perf/helpers/aggregate.lua b/perf/helpers/aggregate.lua index 12a8ab89..01410a47 100644 --- a/perf/helpers/aggregate.lua +++ b/perf/helpers/aggregate.lua @@ -15,6 +15,14 @@ local json = require('cjson') -- [1]: https://docs.influxdata.com/influxdb/v2/reference/syntax/line-protocol/ -- -- luacheck: pop +-- +-- The script takes 2 command line arguments: +-- | luajit aggregate.lua output_file [input_dir] +-- If `input_dir` isn't given, it uses the current directory by +-- default. +-- The script requires the `git` command or specified +-- `PERF_COMMIT`, `PERF_BRANCH` environment variables. Also, it +-- requires the `cjson` module. local output = assert(arg[1], 'Output file is required as the first argument') local input_dir = arg[2] or '.' =================================================================== > > > + > > +local output = assert(arg[1], 'Output file is required as the first argument') > > +local input_dir = arg[2] or '.' > > + > > +local out_fh = assert(io.open(output, 'w+')) > > + > > +local function exec(cmd) > > + return io.popen(cmd):read('*all'):gsub('%s+$', '') > > +end > > + > > +local commit = os.getenv('PERF_COMMIT') or exec('git rev-parse --short HEAD') > > +assert(commit, 'can not determine the commit') > > + > > +local branch = os.getenv('PERF_BRANCH') or > > + exec('git rev-parse --abbrev-ref HEAD') > > +assert(branch, 'can not determine the branch') > > + -- Best regards, Sergey Kaplun