From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (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 895474765E0 for ; Fri, 25 Dec 2020 11:13:16 +0300 (MSK) References: <0e1d128e4f2eed0f0858dbfb6cb012de52baa4e6.1608816289.git.sergepetrenko@tarantool.org> <8c063c6d-50e6-07bc-a9d4-98e805176ee6@tarantool.org> From: Aleksandr Lyapunov Message-ID: Date: Fri, 25 Dec 2020 11:13:15 +0300 MIME-Version: 1.0 In-Reply-To: <8c063c6d-50e6-07bc-a9d4-98e805176ee6@tarantool.org> Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Transfer-Encoding: 8bit Content-Language: en-US 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 , Vladislav Shpilevoy , mons@tarantool.org Cc: tarantool-patches@dev.tarantool.org Hi, thanks for the patch! 1/2 - LGTM! On 25.12.2020 00:09, Serge Petrenko wrote: > > > 24.12.2020 20:54, Vladislav Shpilevoy пишет: >> Hi! Thanks for the patch! >> >> Consider this diff which I pushed as a separate commit >> in your branch: > > Thanks for the review! > > I applied your diff. > > Sorry you had to fix indentation for me. > >> >> ==================== >> 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 >