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 20C5C7744F1; Mon, 10 Feb 2025 17:51:55 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 20C5C7744F1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1739199115; bh=q3TAtT1hLgfRZHzfCnEp/XZf5Xst9EEny419bp8xc2g=; 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=bL4Ip9p7Jsg9c9Rh4DmP+aP4TwD/wNlpMAzZSqKSVgDmyhwQmCjaGpIXLDiGi5VPJ VzGQznY8YfNLVbLTCVHeZiYiL7sP84xNZqENKIV2jxHG2LGUj27CUY1J/3UMA2MqX7 ENXsdpQR+PAYbsSEhAHrFETgkwHnizEMjJg11sMA= Received: from send196.i.mail.ru (send196.i.mail.ru [95.163.59.35]) (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 CCDBF5AAECB for ; Mon, 10 Feb 2025 17:51:53 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org CCDBF5AAECB Received: by exim-smtp-5c664d6544-tvpr9 with esmtpa (envelope-from ) id 1thV8a-00000000RIE-30nQ; Mon, 10 Feb 2025 17:51:53 +0300 Date: Mon, 10 Feb 2025 17:51:06 +0300 To: Sergey Bronnikov Cc: tarantool-patches@dev.tarantool.org Message-ID: References: <6b70bd32f156ff24015bd48c45a404eafacd468a.1738663201.git.sergeyb@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6b70bd32f156ff24015bd48c45a404eafacd468a.1738663201.git.sergeyb@tarantool.org> X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD980EDB4062763125EAFF16E40C854B1E7D68A8EB2592E4D7400894C459B0CD1B974D1021D4981310F03AAE3001806DF10373DCA8878EBB703A2623FF0697791C305401ED2CA4B53CD X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE701173C01F417A2A6EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006378F6D32451C4A3CAA8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D86F88899F534426C2A986E54CDF4C297FD9009778FB206EC2CC7F00164DA146DAFE8445B8C89999728AA50765F7900637F6B57BC7E64490618DEB871D839B7333395957E7521B51C2DFABB839C843B9C08941B15DA834481F8AA50765F7900637CAEE156C82D3D7D9389733CBF5DBD5E9B5C8C57E37DE458BD9DD9810294C998ED8FC6C240DEA76428AA50765F79006370F9B9C81FEA0DEC7D81D268191BDAD3DBD4B6F7A4D31EC0BE2F48590F00D11D6D81D268191BDAD3D78DA827A17800CE78F84DE33370BE923EC76A7562686271ED91E3A1F190DE8FD2E808ACE2090B5E14AD6D5ED66289B5259CC434672EE63711DD303D21008E298D5E8D9A59859A8B6B372FE9A2E580EFC725E5C173C3A84C34B08FA16E56A400835872C767BF85DA2F004C90652538430E4A6367B16DE6309 X-C1DE0DAB: 0D63561A33F958A598DE9CC3DBC4BE865002B1117B3ED6966C6B9A63F7AA77F4B74D9144D44E4FCF823CB91A9FED034534781492E4B8EEAD47A3109F1ACFD409BDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0ADBF74143AD284FC7177DD89D51EBB7742424CF958EAFF5D571004E42C50DC4CA955A7F0CF078B5EC49A30900B95165D34A533D6DF7731C664E886EED71247FF85998A844A357190252AE7928908C4924BD90C307C8DFBCB741D7E09C32AA3244CCD8E56213CDEEE9D77DD89D51EBB7742A132A7722090DAE9EA455F16B58544A2E30DDF7C44BCB90DA5AE236DF995FB59829709634694AABAED6A17656DB59BCAD427812AF56FC65B X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojy7TIew8PonFrs8fFTnCjlw== X-Mailru-Sender: 520A125C2F17F0B1A9638AD358559B59FAE7526217ACC88C3DE06ABAFEAF6705491127784F7704E9B7CBEF92542CD7C88B0A2698F12F5C9EC77752E0C033A69E86920BD37369036789A8C6A0E60D2BB63A5DB60FBEB33A8A0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 1/4] test: add descriptions to sysprof testcases 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 patch! LGTM, with a bunch of nits below. On 04.02.25, Sergey Bronnikov wrote: > The patch add descriptions to sysprof testcases to make TAP report Typo: s/add/adds/ Typo: s/TAP/the TAP/ > more usable. > --- > .../profilers/misclib-sysprof-lapi.test.lua | 36 ++++++++++--------- > 1 file changed, 20 insertions(+), 16 deletions(-) > > diff --git a/test/tarantool-tests/profilers/misclib-sysprof-lapi.test.lua b/test/tarantool-tests/profilers/misclib-sysprof-lapi.test.lua > index b2c38c49..581fb7fd 100644 > --- a/test/tarantool-tests/profilers/misclib-sysprof-lapi.test.lua > +++ b/test/tarantool-tests/profilers/misclib-sysprof-lapi.test.lua > @@ -65,34 +65,35 @@ end > > -- Wrong profiling mode. > local res, err, errno = misc.sysprof.start{ mode = "A" } > -test:ok(res == nil and err:match("profiler misuse")) > -test:ok(type(errno) == "number") > +test:ok(res == nil and err:match("profiler misuse"), "res with no parameters") Minor: s/res/result status/ Here and below. Feel free to ignore. It is not the "no parameters", but rather the wrong profiler mode. > +test:ok(type(errno) == "number", "errno with no parameters") It is not the "no parameters", but rather the wrong profiler mode. > > -- Already running. > -- Not running. > -- Bad path. > res, err, errno = misc.sysprof.start({ mode = "C", path = BAD_PATH }) > -test:ok(res == nil and err:match("No such file or directory")) > -test:ok(type(errno) == "number") > +test:ok(res == nil and err:match("No such file or directory"), "res and error with bad path") Nit: Line length is more than 80 symbols. > +test:ok(type(errno) == "number", "errno with bad path") > > -- Bad interval. > res, err, errno = misc.sysprof.start{ mode = "C", interval = -1 } > -test:ok(res == nil and err:match("profiler misuse")) > -test:ok(type(errno) == "number") > +test:ok(res == nil and err:match("profiler misuse"), "res and error with bad interval") Nit: Line length is more than 80 symbols. > +test:ok(type(errno) == "number", "errno with bad interval") > > -- DEFAULT MODE > > @@ -102,20 +103,23 @@ end > > local report = misc.sysprof.report() > > --- Check the profile is not empty > -test:ok(report.samples > 0) > +-- Check the profile is not empty. > +test:ok(report.samples > 0, "number of samples is greater than 0") I would also add the following: "... than 0 for the default payload" > -- There is a Lua function with FNEW bytecode in it. Hence there > -- are only three possible sample types: > -- * LFUNC -- Lua payload is sampled. > -- * GC -- Lua GC machinery triggered in scope of FNEW bytecode > -- is sampled. > -- * INTERP -- VM is in a specific state when the sample is taken. > -test:ok(report.vmstate.LFUNC + report.vmstate.GC + report.vmstate.INTERP > 0) > +test:ok(report.vmstate.LFUNC + report.vmstate.GC + report.vmstate.INTERP > 0, > + "total number of LFUNC, GC and INTERP samples is greater than 0") I would also add the following: "... than 0 for the default payload" > -- There is no fast functions and C function in default payload. > -test:ok(report.vmstate.FFUNC + report.vmstate.CFUNC == 0) > +test:ok(report.vmstate.FFUNC + report.vmstate.CFUNC == 0, > + "total number of FFUNC and CFUNC samples is equal to 0") I would also add the following: "... to 0 for the default payload" > -- Check all JIT-related VM states are not sampled. > for _, vmstate in pairs({ 'TRACE', 'RECORD', 'OPT', 'ASM', 'EXIT' }) do > - test:ok(report.vmstate[vmstate] == 0) > + local msg = ("total number of VM state %s is equal to 0"):format(vmstate) I would also add the following: "... to 0 for the default payload" Minor: I would avoid the tmp variable here, since it is used only once anyway. > + test:ok(report.vmstate[vmstate] == 0, msg) > end > > -- With very big interval. > @@ -124,7 +128,7 @@ if not pcall(generate_output, { mode = "D", interval = 1000 }) then > end > > report = misc.sysprof.report() > -test:ok(report.samples == 0) > +test:ok(report.samples == 0, "total number of samples is equal to 0") I would also add the following: "... to 0 for the too big sampling interval" > > -- LEAF MODE > check_mode("L", 100) > -- > 2.34.1 > -- Best regards, Sergey Kaplun