You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
883 B
16 lines
883 B
local naughty = require("naughty")
|
|
local debug = {}
|
|
-- from (https://www.reddit.com/r/awesomewm/comments/te49nb/why_does_awesomes_ram_consumption_get_higher_and/)
|
|
function debug.print_awesome_memory_stats(message)
|
|
print(os.date(), "\nLua memory usage:", collectgarbage("count"))
|
|
out_string = tostring(os.date()) .. "\nLua memory usage:"..tostring(collectgarbage("count")).."\n"
|
|
out_string = out_string .. "Objects alive:"
|
|
print("Objects alive:")
|
|
for name, obj in pairs{ button = button, client = client, drawable = drawable, drawin = drawin, key = key, screen = screen, tag = tag } do
|
|
out_string =out_string .. "\n" .. tostring(name) .. " = " ..tostring(obj.instances())
|
|
print(name, obj.instances())
|
|
end
|
|
naughty.notify({title = "Awesome WM memory statistics " .. message, text = out_string, timeout=20,hover_timeout=20})
|
|
end
|
|
|
|
return debug
|