[dongle commit] r668 - trunk/OptionHouse

1 view
Skip to first unread message

codesite...@google.com

unread,
Mar 7, 2008, 7:02:01 PM3/7/08
to dongle...@googlegroups.com
Author: shadowed.wow
Date: Fri Mar 7 16:01:05 2008
New Revision: 668

Modified:
trunk/OptionHouse/OH_PerfMon.lua

Log:
* Fixed memory calculations, uses 1024 correctly now instead of 1000
* Fixed a bug with dividing total memory by 1024 when the total memory
was only above 100 instead of when above 1024

Modified: trunk/OptionHouse/OH_PerfMon.lua
==============================================================================
--- trunk/OptionHouse/OH_PerfMon.lua (original)
+++ trunk/OptionHouse/OH_PerfMon.lua Fri Mar 7 16:01:05 2008
@@ -114,14 +114,14 @@
return
end

- if( frame.totalMemory > 1000 ) then
- frame.sortButtons[2]:SetFormattedText("%s (%.1f %s)", L["MEMORY"],
frame.totalMemory / 1000, "MiB")
+ if( frame.totalMemory > 1024 ) then
+ frame.sortButtons[2]:SetFormattedText("%s (%.1f %s)", L["MEMORY"],
frame.totalMemory / 1024, "MiB")
else
frame.sortButtons[2]:SetFormattedText("%s (%.1f %s)", L["MEMORY"], frame.totalMemory, "KiB")
end

- if( frame.totalMIR > 100 ) then
- frame.sortButtons[3]:SetFormattedText("%s (%.2f %s)", L["MEMSEC"],
frame.totalMIR / 1000, "MiB/s")
+ if( frame.totalMIR > 1024 ) then
+ frame.sortButtons[3]:SetFormattedText("%s (%.2f %s)", L["MEMSEC"],
frame.totalMIR / 1024, "MiB/s")
else
frame.sortButtons[3]:SetFormattedText("%s (%.2f %s)", L["MEMSEC"], frame.totalMIR, "KiB/s")
end
@@ -147,14 +147,14 @@
if( addon ) then
row[1]:SetText(addon.title)

- if( addon.memory > 1000 ) then
- row[2]:SetFormattedText("%.3f MiB (%.2f%%)", addon.memory / 1000, addon.memPerct)
+ if( addon.memory > 1024 ) then
+ row[2]:SetFormattedText("%.3f MiB (%.2f%%)", addon.memory / 1024, addon.memPerct)
else
row[2]:SetFormattedText("%.3f KiB (%.2f%%)", addon.memory, addon.memPerct)
end

- if( addon.mir > 1000 ) then
- row[3]:SetFormattedText("%.3f MiB/s", addon.mir / 1000)
+ if( addon.mir > 1024 ) then
+ row[3]:SetFormattedText("%.3f MiB/s", addon.mir / 1024)
else
row[3]:SetFormattedText("%.3f KiB/s", addon.mir)
end

Reply all
Reply to author
Forward
0 new messages