Created
February 10, 2021 07:43
-
-
Save den-kozlov/7015570dd1c4b979b6f0dfb607e11088 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function MAP(t) return setmetatable(t,require'json'.map_mt) end local t = require'fun'.iter(box.slab.stats()):map(function(s) return MAP{kind=s.item_size, cnt=s.slab_count, items=s.item_count, use=math.floor(s.mem_used/(s.slab_size * s.slab_count)*1000)/10, size=s.slab_size} end):totable() table.sort(t,function(a,b) return a.kind < b.kind end) return t |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment