aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Server
diff options
context:
space:
mode:
authorGiacomo Pozzoni <giacomopoz@gmail.com>2020-07-28 12:27:54 +0000
committerGitHub <noreply@github.com>2020-07-28 14:27:54 +0200
commit8a2c79c850199a73fd431d04f83d6aa89733060d (patch)
tree7f29acac68d13b9ec9239b9fe9536b6f1e0bda9c /src/server/game/Server
parent8642aaaf9268364454b409db7eb62f31210e6d6c (diff)
Core/Metric: Log detailed metrics about each opcode handler (#25153)
* Core/Metric: Log detailed metrics about each opcode handler * Add new panel to Performance profiling dashboard and use fill(0) instead of fill(none) * Add new settings Metric.Threshold.* to be able to specify the minimum threshold for the specified metrics * Update dashboard * Change thresholds to be required to send the metrics. A TC_METRIC_DETAILED_TIMER metric with an expected threshold not configured will be ignored * Use typedef Milliseconds * Refresh realms on load
Diffstat (limited to 'src/server/game/Server')
-rw-r--r--src/server/game/Server/WorldSession.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/server/game/Server/WorldSession.cpp b/src/server/game/Server/WorldSession.cpp
index abbf28c8bae..9ec0d9244b3 100644
--- a/src/server/game/Server/WorldSession.cpp
+++ b/src/server/game/Server/WorldSession.cpp
@@ -291,7 +291,10 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater)
while (m_Socket && _recvQueue.next(packet, updater))
{
- ClientOpcodeHandler const* opHandle = opcodeTable[static_cast<OpcodeClient>(packet->GetOpcode())];
+ OpcodeClient opcode = static_cast<OpcodeClient>(packet->GetOpcode());
+ ClientOpcodeHandler const* opHandle = opcodeTable[opcode];
+ TC_METRIC_DETAILED_TIMER("worldsession_update_opcode_time", TC_METRIC_TAG("opcode", opHandle->Name));
+
try
{
switch (opHandle->Status)