From ff518e7cbbb9f810db4bb9374b98390bd5fb3f11 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 17 Aug 2014 02:12:45 +0100 Subject: make webutilmore verbose on PUT for avatar updates. Reduce LargeTime debug level to 500ms from 3000ms --- OpenSim/Framework/WebUtil.cs | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs index 33ef8e0..86e5293 100644 --- a/OpenSim/Framework/WebUtil.cs +++ b/OpenSim/Framework/WebUtil.cs @@ -81,7 +81,7 @@ namespace OpenSim.Framework /// Number of milliseconds a call can take before it is considered /// a "long" call for warning & debugging purposes /// - public const int LongCallTime = 3000; + public const int LongCallTime = 500; /// /// The maximum length of any data logged because of a long request time. @@ -208,6 +208,9 @@ namespace OpenSim.Framework string errorMessage = "unknown error"; int tickstart = Util.EnvironmentTickCount(); int tickdata = 0; + int tickcompressdata = 0; + int tickJsondata = 0; + int compsize = 0; string strBuffer = null; try @@ -225,6 +228,8 @@ namespace OpenSim.Framework { strBuffer = OSDParser.SerializeJsonString(data); + tickJsondata = Util.EnvironmentTickCountSubtract(tickstart); + if (DebugLevel >= 5) LogOutgoingDetail(strBuffer); @@ -243,13 +248,19 @@ namespace OpenSim.Framework // gets written on the strteam upon Dispose() } byte[] buf = ms.ToArray(); + + tickcompressdata = Util.EnvironmentTickCountSubtract(tickstart); + request.ContentLength = buf.Length; //Count bytes to send + compsize = buf.Length; using (Stream requestStream = request.GetRequestStream()) requestStream.Write(buf, 0, (int)buf.Length); } } else { + tickcompressdata = tickJsondata; + compsize = buffer.Length; request.ContentType = "application/json"; request.ContentLength = buffer.Length; //Count bytes to send using (Stream requestStream = request.GetRequestStream()) @@ -291,12 +302,16 @@ namespace OpenSim.Framework int tickdiff = Util.EnvironmentTickCountSubtract(tickstart); if (tickdiff > LongCallTime) m_log.InfoFormat( - "[WEB UTIL]: Slow ServiceOSD request {0} {1} {2} took {3}ms, {4}ms writing, {5}", + "[WEB UTIL]: Slow ServiceOSD request {0} {1} {2} took {3}ms, {4}ms writing({5} at Json; {6} at comp), {7} bytes ({8} uncomp): {9}", reqnum, method, url, tickdiff, tickdata, + tickJsondata, + tickcompressdata, + compsize, + strBuffer != null ? strBuffer.Length : 0, strBuffer != null ? (strBuffer.Length > MaxRequestDiagLength ? strBuffer.Remove(MaxRequestDiagLength) : strBuffer) : ""); -- cgit v1.1