From 8a2c79c850199a73fd431d04f83d6aa89733060d Mon Sep 17 00:00:00 2001 From: Giacomo Pozzoni Date: Tue, 28 Jul 2020 12:27:54 +0000 Subject: 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 --- src/server/game/Server/WorldSession.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/server/game/Server') 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(packet->GetOpcode())]; + OpcodeClient opcode = static_cast(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) -- cgit v1.2.3