From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp36.i.mail.ru (smtp36.i.mail.ru [94.100.177.96]) (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 972D54765E0 for ; Fri, 25 Dec 2020 00:09:41 +0300 (MSK) References: <0e1d128e4f2eed0f0858dbfb6cb012de52baa4e6.1608816289.git.sergepetrenko@tarantool.org> From: Serge Petrenko Message-ID: <8c063c6d-50e6-07bc-a9d4-98e805176ee6@tarantool.org> Date: Fri, 25 Dec 2020 00:09:39 +0300 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Transfer-Encoding: 8bit Content-Language: en-GB 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: Vladislav Shpilevoy , alyapunov@tarantool.org, mons@tarantool.org Cc: tarantool-patches@dev.tarantool.org 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 -- Serge Petrenko