Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release Lua profiler v1.1.2 #1498

Merged
merged 1 commit into from
Feb 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions Development/cfillion_Lua profiler.lua
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
-- @description Lua profiler
-- @author cfillion
-- @version 1.1.1
-- @changelog
-- • Preserve the apparent flame graph zoom level when resizing the window
-- • Increase flame graph mousewheel zoom speed
-- • Fix undesirable horizontal scrolling when the window is very small
-- @version 1.1.2
-- @changelog • Prevent `foo.bar = foo` from displaying foo.bar.bar.bar.bar.bar.bar.baz [p=2844801]
-- @provides [nomain] .
-- @link Forum thread https://forum.cockos.com/showthread.php?t=283461
-- @screenshot
Expand Down Expand Up @@ -707,10 +704,13 @@ attachToTable = function(is_attach, prefix, array, opts, depth, in_metatable)
if array == package.loaded then return end

for name, value in pairs(array) do
local path = name
if prefix then path = string.format('%s.%s', prefix, name) end
local ok, wrapper = attach(is_attach, path, value, opts, depth, in_metatable)
if wrapper then array[name] = wrapper end
-- prevent `foo.bar = foo` from displaying foo.bar.bar.bar.bar.bar.bar.baz
if value ~= array then
local path = name
if prefix then path = string.format('%s.%s', prefix, name) end
local ok, wrapper = attach(is_attach, path, value, opts, depth, in_metatable)
if wrapper then array[name] = wrapper end
end
end
end

Expand Down