mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 08:24:44 +00:00
update System datatext memory
This commit is contained in:
@@ -33,7 +33,6 @@ local enteredFrame = false
|
|||||||
local homeLatencyString = "%d ms"
|
local homeLatencyString = "%d ms"
|
||||||
local kiloByteString = "%d kb"
|
local kiloByteString = "%d kb"
|
||||||
local megaByteString = "%.2f mb"
|
local megaByteString = "%.2f mb"
|
||||||
local totalMemory = 0
|
|
||||||
|
|
||||||
local function formatMem(memory)
|
local function formatMem(memory)
|
||||||
local mult = 10 ^ 1
|
local mult = 10 ^ 1
|
||||||
@@ -66,16 +65,6 @@ local function RebuildAddonList()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function UpdateMemory()
|
|
||||||
--UpdateAddOnMemoryUsage()
|
|
||||||
--[[totalMemory = 0
|
|
||||||
for i = 1, getn(memoryTable) do
|
|
||||||
memoryTable[i][3] = GetAddOnMemoryUsage(memoryTable[i][1])
|
|
||||||
totalMemory = totalMemory + memoryTable[i][3]
|
|
||||||
end
|
|
||||||
sort(memoryTable, sortByMemoryOrCPU)]]
|
|
||||||
end
|
|
||||||
|
|
||||||
local function UpdateCPU()
|
local function UpdateCPU()
|
||||||
UpdateAddOnCPUUsage()
|
UpdateAddOnCPUUsage()
|
||||||
local addonCPU = 0
|
local addonCPU = 0
|
||||||
@@ -103,8 +92,8 @@ end
|
|||||||
|
|
||||||
local function OnClick(_, btn)
|
local function OnClick(_, btn)
|
||||||
if(btn == "RightButton") then
|
if(btn == "RightButton") then
|
||||||
collectgarbage("collect")
|
-- collectgarbage("collect")
|
||||||
ResetCPUUsage()
|
-- ResetCPUUsage()
|
||||||
elseif(btn == "LeftButton") then
|
elseif(btn == "LeftButton") then
|
||||||
ToggleGameMenuFrame()
|
ToggleGameMenuFrame()
|
||||||
end
|
end
|
||||||
@@ -115,7 +104,7 @@ local function OnEnter(self)
|
|||||||
local cpuProfiling = false
|
local cpuProfiling = false
|
||||||
DT:SetupTooltip(self)
|
DT:SetupTooltip(self)
|
||||||
|
|
||||||
UpdateMemory()
|
local totalMemory = gcinfo()
|
||||||
|
|
||||||
local _, _, latency = GetNetStats()
|
local _, _, latency = GetNetStats()
|
||||||
DT.tooltip:AddDoubleLine(L["Home Latency:"], format(homeLatencyString, latency), 0.69, 0.31, 0.31, 0.84, 0.75, 0.65)
|
DT.tooltip:AddDoubleLine(L["Home Latency:"], format(homeLatencyString, latency), 0.69, 0.31, 0.31, 0.84, 0.75, 0.65)
|
||||||
|
|||||||
Reference in New Issue
Block a user