restructured and extended performance diagnostics to cover gump and target responses

This commit is contained in:
krrios 2007-04-22 06:08:45 +00:00
parent a8d3bcbec9
commit 5c64b1754c
12 changed files with 569 additions and 401 deletions

View file

@ -26,6 +26,7 @@ using System.Net;
using System.Net.Sockets;
using Server;
using Server.Network;
using Server.Diagnostics;
namespace Server.Network
{
@ -221,8 +222,11 @@ namespace Server.Network
return false;
}
PacketProfile profile = PacketProfile.GetIncomingProfile( packetID );
DateTime start = ( profile == null ? DateTime.MinValue : DateTime.Now );
PacketReceiveProfile prof = PacketReceiveProfile.Acquire( packetID );
if ( prof != null ) {
prof.Start();
}
byte[] packetBuffer;
@ -241,8 +245,9 @@ namespace Server.Network
if ( BufferSize >= packetLength )
m_Buffers.ReleaseBuffer( packetBuffer );
if ( profile != null )
profile.Record( packetLength, DateTime.Now - start );
if ( prof != null ) {
prof.Finish( packetLength );
}
}
}
else