diff options
Diffstat (limited to 'src/server')
| -rw-r--r-- | src/server/game/Server/WorldSession.cpp | 5 | ||||
| -rw-r--r-- | src/server/worldserver/worldserver.conf.dist | 14 |
2 files changed, 18 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) diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist index d5d11cf956d..801d2bbcb57 100644 --- a/src/server/worldserver/worldserver.conf.dist +++ b/src/server/worldserver/worldserver.conf.dist @@ -4067,4 +4067,18 @@ Metric.ConnectionInfo = "127.0.0.1;8086;worldserver" Metric.OverallStatusInterval = 1 # +# Metric threshold values: Given a metric "name" +# Metric.Threshold.name +# Description: Skips sending statistics with a value lower than the config value. +# If the threshold is commented out, the metric will be ignored. +# Only metrics logged with TC_METRIC_DETAILED_TIMER in the sources are affected. +# Disabled by default. Requires WITH_DETAILED_METRICS CMake flag. +# +# Format: Value as integer +# + +#Metric.Threshold.world_update_sessions_time = 100 +#Metric.Threshold.worldsession_update_opcode_time = 50 + +# ################################################################################################### |
