trying to get coverage analysis to reasonable time

This commit is contained in:
Michael Freno
2025-11-20 14:27:34 -05:00
parent d0357672db
commit 92068d5315
17 changed files with 3011 additions and 380 deletions

View File

@@ -194,11 +194,29 @@ function profile.draw()
love.graphics.print("Press - to remove 10 animated elements", 10, love.graphics.getHeight() - 45)
end
function profile.keypressed(key)
function profile.keypressed(key, profiler)
if key == "=" or key == "+" then
-- Create snapshot before changing animation count
if profiler then
local label = string.format("%d animations", profile.animationCount)
profiler:createSnapshot(label, {
animationCount = profile.animationCount,
activeAnimations = #profile.animations
})
end
profile.animationCount = math.min(profile.maxAnimations, profile.animationCount + 10)
profile.buildLayout()
elseif key == "-" or key == "_" then
-- Create snapshot before changing animation count
if profiler then
local label = string.format("%d animations", profile.animationCount)
profiler:createSnapshot(label, {
animationCount = profile.animationCount,
activeAnimations = #profile.animations
})
end
profile.animationCount = math.max(profile.minAnimations, profile.animationCount - 10)
profile.buildLayout()
end