Busy just writting up a little addon as replacement to SLDT which I just use to purely show a small strip on my MiniMap like: "x fps x ms x.x mb", so I shoved this little addon together below but for some crazy reason it just won't collect the data from GetAddOnMessageUsage and constantly returns 0 (not nil, just 0 as a number) and it has my head pickled as I can't figure out why... any ideas?
f is the frame, f.txt is the font string. fps and ms work just fine, mem however doesn't.
Code:
local new, mb = 0, 0
f:SetScript("OnUpdate", function(self, old)
new = new + old
if ( new >= 3 ) then
for i = 1, GetNumAddOns() do
if ( IsAddOnLoaded(i) ) then
mb = mb + (GetAddOnMemoryUsage(i)/1024)
end
end
fps = format("%.0f |cffff0000fps|r", GetFramerate())
lat = format("%s |cffff0000ms|r", select(3, GetNetStats()))
mem = format("%.1f |cffff0000mb|r", mb)
f.txt:SetFormattedText("%s %s %s", fps, lat, mem)
f:SetWidth(f.txt:GetStringWidth())
f:SetHeight(f.txt:GetStringHeight())
new, mb = 0, 0
end
end)