[Tarantool-patches] [PATCH 1/2] feedback_daemon: add operation statistics reporting

Serge Petrenko sergepetrenko at tarantool.org
Fri Dec 25 00:09:39 MSK 2020



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



More information about the Tarantool-patches mailing list