Skip to content

Commit

Permalink
- bit less verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
cont1nuity committed Dec 28, 2024
1 parent ae94617 commit 51b2fee
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
4 changes: 4 additions & 0 deletions Plater_ChangeLog.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ function Plater.GetChangelogTable()
if (not Plater.ChangeLogTable) then
Plater.ChangeLogTable = {

{1734100705, "Backend Change", "Dec 19th, 2024", "Framework updates.", "Terciob"},
{1735420632, "Backend Change", "Dec 18th, 2024", "Retail TOC update.", "cont1nuity"},
{1735420632, "New Feature", "Dec 18th, 2024", "Adding Blizzard addon profiling information to profiler.", "cont1nuity"},

{1734100705, "Bug Fix", "Dec 4th, 2024", "Reset Boss-Mod integration icon glow properly.", "cont1nuity"},
{1734100705, "Backend Change", "Dec 13th, 2024", "Framework updates.", "Terciob"},
{1734100705, "Bug Fix", "Dec 4th, 2024", "Fixing an issue with spell-name truncation.", "cont1nuity"},
Expand Down
16 changes: 12 additions & 4 deletions Plater_Profiling.lua
Original file line number Diff line number Diff line change
Expand Up @@ -633,13 +633,17 @@ local function getAdvancedPerfData()
printStrHeader = printStrHeader .. "\n\n" .. PRT_INDENT .. "Overall Addon Metrics:\n"
for _, metric in pairs(addonMetricsNames) do
currentMetrics.global[metric] = C_AddOnProfiler.GetOverallMetric(Enum.AddOnProfilerMetric[metric])
printStrHeader = printStrHeader .. PRT_INDENT .. PRT_INDENT .. metric .. ": " .. roundTime(currentMetrics.global[metric]) .. "\n"
if currentMetrics.global[metric] > 0 then
printStrHeader = printStrHeader .. PRT_INDENT .. PRT_INDENT .. metric .. ": " .. roundTime(currentMetrics.global[metric]) .. "\n"
end
end

printStrHeader = printStrHeader .. "\n\n" .. PRT_INDENT .. "Plater Addon Metrics:\n"
for _, metric in pairs(addonMetricsNames) do
currentMetrics.Plater[metric] = C_AddOnProfiler.GetAddOnMetric(addonId, Enum.AddOnProfilerMetric[metric])
printStrHeader = printStrHeader .. PRT_INDENT .. PRT_INDENT .. metric .. ": " .. roundTime(currentMetrics.Plater[metric]) .. " (" .. roundPercent(currentMetrics.Plater[metric]/currentMetrics.global[metric]*100) .. "%)\n"
if currentMetrics.Plater[metric] > 0 then
printStrHeader = printStrHeader .. PRT_INDENT .. PRT_INDENT .. metric .. ": " .. roundTime(currentMetrics.Plater[metric]) .. " (" .. roundPercent(currentMetrics.Plater[metric]/currentMetrics.global[metric]*100) .. "%)\n"
end
end

local profilingMetrics = {}
Expand All @@ -649,13 +653,17 @@ local function getAdvancedPerfData()
printStrHeader = printStrHeader .. "\n\n" .. PRT_INDENT .. "Overall Addon Metrics:\n"
for _, metric in pairs(addonMetricsNamesForSession) do
profilingMetrics.global[metric] = addonMetricsAtEnd.global[metric] - addonMetricsAtStart.global[metric]
printStrHeader = printStrHeader .. PRT_INDENT .. PRT_INDENT .. metric .. ": " .. roundTime(profilingMetrics.global[metric]) .. "\n"
if profilingMetrics.global[metric] > 0 then
printStrHeader = printStrHeader .. PRT_INDENT .. PRT_INDENT .. metric .. ": " .. roundTime(profilingMetrics.global[metric]) .. "\n"
end
end

printStrHeader = printStrHeader .. "\n\n" .. PRT_INDENT .. "Plater Addon Metrics:\n"
for _, metric in pairs(addonMetricsNamesForSession) do
profilingMetrics.Plater[metric] = addonMetricsAtEnd.Plater[metric] - addonMetricsAtStart.Plater[metric]
printStrHeader = printStrHeader .. PRT_INDENT .. PRT_INDENT .. metric .. ": " .. roundTime(profilingMetrics.Plater[metric]) .. " (" .. roundPercent(profilingMetrics.Plater[metric]/profilingMetrics.global[metric]*100) .. "%)\n"
if profilingMetrics.Plater[metric] > 0 then
printStrHeader = printStrHeader .. PRT_INDENT .. PRT_INDENT .. metric .. ": " .. roundTime(profilingMetrics.Plater[metric]) .. " (" .. roundPercent(profilingMetrics.Plater[metric]/profilingMetrics.global[metric]*100) .. "%)\n"
end
end

end
Expand Down

0 comments on commit 51b2fee

Please sign in to comment.