Skip to content

Commit

Permalink
Merge pull request #23 from superstyro/ServerTAB-update-issue
Browse files Browse the repository at this point in the history
Bump MINOR_VERSION to 007 and add Mean, Median, and Percentiles outpu…
  • Loading branch information
superstyro authored Dec 24, 2024
2 parents 49293c9 + cf24619 commit 6394256
Show file tree
Hide file tree
Showing 4 changed files with 111 additions and 10 deletions.
22 changes: 20 additions & 2 deletions AzerothAdmin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ gettingGOBinfo=0
gettingGOBinfoinfo=0

MAJOR_VERSION = "AzerothAdmin-3.3.5"
MINOR_VERSION = "$Revision: 006 $"
MINOR_VERSION = "$Revision: 007 $"
ROOT_PATH = "Interface\\AddOns\\AzerothAdmin\\"
local cont = ""
if not AceLibrary then error(MAJOR_VERSION .. " requires AceLibrary") end
Expand Down Expand Up @@ -884,14 +884,32 @@ function AzerothAdmin:AddMessage(frame, text, r, g, b, id)
-- for diff in string.gmatch(text, Strings["ma_GmatchUpdateDiff"]) do
-- ma_difftext:SetText(diff)
-- catchedSth = true
-- -- output = AzerothAdmin.db.account.style.showchat
-- output = AzerothAdmin.db.account.style.showchat
-- end
for difftime in string.gmatch(text, Strings["ma_GmatchUpdateDiffTime"]) do --We just want the Diff time number value
ma_difftext:SetText(difftime)
catchedSth = true
output = AzerothAdmin.db.account.style.showchat
end

-- hook Last 500 diff info from .server info
for mean in string.gmatch(text, Strings["ma_GmatchMean"]) do
ma_meantextoutput:SetText(mean .. " ms")
catchedSth = true
output = AzerothAdmin.db.account.style.showchat
end
for median in string.gmatch(text, Strings["ma_GmatchMedian"]) do
ma_mediantextoutput:SetText(median .. " ms")
catchedSth = true
output = AzerothAdmin.db.account.style.showchat
end
for p95, p99, pmax in string.gmatch(text, Strings["ma_GmatchPercentiles"]) do
--print("Matched percentiles:", p95, p99, pmax) -- Debug print
--ma_percentilestextoutput:SetText("95th: " .. p95 .. "ms, 99th: " .. p99 .. "ms, Max: " .. pmax .. "ms")
ma_percentilestextoutput:SetText("".. p95 .. " ms, " .. p99 .. " ms, " .. pmax .. " ms") -- simple output
catchedSth = true
end

-- hook all new tickets
for name in string.gmatch(text, Strings["ma_GmatchNewTicket"]) do
self:SetIcon(ROOT_PATH.."Textures\\icon2.tga")
Expand Down
21 changes: 14 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# AzerothAdmin Changelog

### -=[ Revision 06 - 12/15/2024]=-
### -=[ Revision 007 - 12/23/2024]=-
- FIX [#22](https://github.com/superstyro/AzerothAdmin/issues/22)
- ADD BuildFontStrings for 'Mean', 'Median', and 'Percentiles' in MangFrames_SectionServer.lua
- FIX string pattern for matching percentiles in strings.lua
- ADD pattern to match '|- Percentiles (95, 99, max): 3ms, 4ms, 4ms'
- UPDATE CHANGELOG.md to follow addon revision number

### -=[ Revision 006 - 12/15/2024]=-
- FIX duplicate `lfer_GOtargguid1` entry in strings.lua
- FIX duplicate `ma_Honor` entry in Locals\enUS.lua
- FIX parameter assignment issue in AceEvent-2.0.lua
Expand All @@ -10,7 +17,7 @@
- FIX #15 Update ticket message handling
- Improved the logic for adding text to ticket messages in the database

### -=[ Revision 05 - 5/04/2024]=-
### -=[ Revision 005 - 5/04/2024]=-
- FIX #11 Hide WHO buttons
- Cannot use level 4 account unless manually set in server console
- FIX #13 Correct server update frequency to be more accurate
Expand All @@ -30,11 +37,11 @@
- Disable ListFreeze button (No command available)
- Correct HonorUpdt button function (Output is in LOG tab)

### -=[ Revision 04 - 4/29/2024]=-
### -=[ Revision 004 - 4/29/2024]=-
- FIX [ADD] [ITEM] buttons
- TODO: Correct [ADD] item count default to 1 in chat window

### -=[ Revision 03 - 1/24/2022]=-
### -=[ Revision 003 - 1/24/2022]=-
- Updated Copyright year 2022
- FIX Ticket TAB
- Ticket Message text was black and difficult to read
Expand All @@ -45,19 +52,19 @@
- Lots off little things added.
- I am bad at keeping this changelog updated.

### -=[ Revision 02 - 10/20/2019]=-
### -=[ Revision 002 - 10/20/2019]=-
- FIX GM tab
- Typo in GM-mode on/off
- Speed Slider: Affect all speeds

### -=[ Revision 01 - 10/18/2019]=-
### -=[ Revision 001 - 10/18/2019]=-
- FIX Server info tab
- Updated strings to match AzerothCore
- FIX Diff Graph LUA error
- Update MiniMenu Icon
- Update Logo

### -=[ Revision 01 - 10/18/2019]=-
### -=[ Revision 000 - 10/18/2019]=-
- Initial Commit for AzerothAdmin (Ported from TrinityAdmin/MangAdmin)
- Version specific build AzerothCore 3.3.5
- Changed TrinityAdmin>AzerothAdmin
Expand Down
75 changes: 74 additions & 1 deletion Frames/MangFrames_SectionServer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -274,11 +274,83 @@ function AzerothAdmin:CreateServerSection()
text = "",
setpoint = {
pos = "TOPLEFT",
offX = 232, --Original 250
offX = 236, --Original 250
offY = -170 --Original -170
}
})

FrameLib:BuildFontString({
name = "ma_meantext",
group = "server",
parent = ma_midframe,
text = "Mean:",
setpoint = {
pos = "TOPLEFT",
offX = 270,
offY = -170
}
})

FrameLib:BuildFontString({
name = "ma_meantextoutput",
group = "server",
parent = ma_midframe,
text = "",
setpoint = {
pos = "TOPLEFT",
offX = 305,
offY = -170
}
})

FrameLib:BuildFontString({
name = "ma_mediantext",
group = "server",
parent = ma_midframe,
text = "Median:",
setpoint = {
pos = "TOPLEFT",
offX = 260,
offY = -185
}
})

FrameLib:BuildFontString({
name = "ma_mediantextoutput",
group = "server",
parent = ma_midframe,
text = "",
setpoint = {
pos = "TOPLEFT",
offX = 305,
offY = -185
}
})

FrameLib:BuildFontString({
name = "ma_percentilestext",
group = "server",
parent = ma_midframe,
text = "Percentiles:",
setpoint = {
pos = "TOPLEFT",
offX = 240,
offY = -200
}
})

FrameLib:BuildFontString({
name = "ma_percentilestextoutput",
group = "server",
parent = ma_midframe,
text = "",
setpoint = {
pos = "TOPLEFT",
offX = 305,
offY = -200
}
})

RealGraph=Graph:CreateGraphRealtime("ma_netgraph_diff",ma_netgraphframe2,"CENTER","CENTER",0,0,150,150)
local z=RealGraph
z:SetAutoScale(false)
Expand All @@ -296,6 +368,7 @@ function AzerothAdmin:CreateServerSection()
if q > tonumber(ma_delayparam:GetText()) then --10000=approx 1 minute, 50000=approx 5 minutes FIX #13
AzerothAdmin:ChatMsg(".server info")
q = 0
--TODO: Change the way the value of 'ma_difftext' is set to be able to add 'ms' to the end of the value
local s = tonumber(ma_difftext:GetText())
local r = 100 -- Trinity says anything over 150 is bad
if s > r then
Expand Down
3 changes: 3 additions & 0 deletions Locales/strings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ function ReturnStrings_enUS()
["ma_GmatchTeleFound"] = "Locations found are:",
["ma_GmatchUpdateDiff"] = "Update time diff: (.*)",
["ma_GmatchUpdateDiffTime"] = "Update time diff: (%d+)",
["ma_GmatchMean"] = "|- Mean: (%d+)",
["ma_GmatchMedian"] = "|- Median: (%d+)",
["ma_GmatchPercentiles"] = "|%- Percentiles %(95, 99, max%): (%d+)ms, (%d+)ms, (%d+)ms",
["ma_GmatchNewTicket"] = "New ticket from(.+)",
["ma_GmatchTicketMessage"] = "Ticket Message.-:.-%[(.*).-%]",
["ma_GmatchTickets"] = ".+Ticket.-:(.*)Created by.-:|cff00ccff (.*)|r.+Created.-:(.*)Last change.-:(.*)",
Expand Down

0 comments on commit 6394256

Please sign in to comment.