From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp40.i.mail.ru (smtp40.i.mail.ru [94.100.177.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 675854765E1 for ; Thu, 24 Dec 2020 20:54:23 +0300 (MSK) References: <0e1d128e4f2eed0f0858dbfb6cb012de52baa4e6.1608816289.git.sergepetrenko@tarantool.org> From: Vladislav Shpilevoy Message-ID: Date: Thu, 24 Dec 2020 18:54:13 +0100 MIME-Version: 1.0 In-Reply-To: <0e1d128e4f2eed0f0858dbfb6cb012de52baa4e6.1608816289.git.sergepetrenko@tarantool.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Tarantool-patches] [PATCH 1/2] feedback_daemon: add operation statistics reporting List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Serge Petrenko , alyapunov@tarantool.org, mons@tarantool.org Cc: tarantool-patches@dev.tarantool.org Hi! Thanks for the patch! Consider this diff which I pushed as a separate commit in your branch: ==================== diff --git a/src/box/lua/feedback_daemon.lua b/src/box/lua/feedback_daemon.lua index 1aac32bb3..07f114aea 100644 --- a/src/box/lua/feedback_daemon.lua +++ b/src/box/lua/feedback_daemon.lua @@ -285,7 +285,7 @@ local function fill_in_options(feedback) end local function fill_in_stats(feedback) - local stats = {box={}, net={}} + local stats = {box = {}, net = {}} local box_stat = box.stat() local net_stat = box.stat.net() @@ -300,11 +300,12 @@ local function fill_in_stats(feedback) end -- Send box.stat.net().*.total and box.stat.net().*.current. for val, tbl in pairs(net_stat) do - if type(tbl) == 'table' and (tbl.total ~= nil or tbl.current ~= nil) then - stats.net[val] = { - total = tbl.total, - current = tbl.current - } + if type(tbl) == 'table' and + (tbl.total ~= nil or tbl.current ~= nil) then + stats.net[val] = { + total = tbl.total, + current = tbl.current + } end end feedback.stats = stats