diff options
author | UbitUmarov | 2014-08-17 02:12:45 +0100 |
---|---|---|
committer | UbitUmarov | 2014-08-17 02:12:45 +0100 |
commit | ff518e7cbbb9f810db4bb9374b98390bd5fb3f11 (patch) | |
tree | 779a15abbfe056a188052ea4603a381416895ef1 /OpenSim/Framework | |
parent | DEBUG intencional break of sending baked cache (diff) | |
download | opensim-SC-ff518e7cbbb9f810db4bb9374b98390bd5fb3f11.zip opensim-SC-ff518e7cbbb9f810db4bb9374b98390bd5fb3f11.tar.gz opensim-SC-ff518e7cbbb9f810db4bb9374b98390bd5fb3f11.tar.bz2 opensim-SC-ff518e7cbbb9f810db4bb9374b98390bd5fb3f11.tar.xz |
make webutilmore verbose on PUT for avatar updates. Reduce LargeTime debug
level to 500ms from 3000ms
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/WebUtil.cs | 19 |
1 files changed, 17 insertions, 2 deletions
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 | |||
81 | /// Number of milliseconds a call can take before it is considered | 81 | /// Number of milliseconds a call can take before it is considered |
82 | /// a "long" call for warning & debugging purposes | 82 | /// a "long" call for warning & debugging purposes |
83 | /// </summary> | 83 | /// </summary> |
84 | public const int LongCallTime = 3000; | 84 | public const int LongCallTime = 500; |
85 | 85 | ||
86 | /// <summary> | 86 | /// <summary> |
87 | /// The maximum length of any data logged because of a long request time. | 87 | /// The maximum length of any data logged because of a long request time. |
@@ -208,6 +208,9 @@ namespace OpenSim.Framework | |||
208 | string errorMessage = "unknown error"; | 208 | string errorMessage = "unknown error"; |
209 | int tickstart = Util.EnvironmentTickCount(); | 209 | int tickstart = Util.EnvironmentTickCount(); |
210 | int tickdata = 0; | 210 | int tickdata = 0; |
211 | int tickcompressdata = 0; | ||
212 | int tickJsondata = 0; | ||
213 | int compsize = 0; | ||
211 | string strBuffer = null; | 214 | string strBuffer = null; |
212 | 215 | ||
213 | try | 216 | try |
@@ -225,6 +228,8 @@ namespace OpenSim.Framework | |||
225 | { | 228 | { |
226 | strBuffer = OSDParser.SerializeJsonString(data); | 229 | strBuffer = OSDParser.SerializeJsonString(data); |
227 | 230 | ||
231 | tickJsondata = Util.EnvironmentTickCountSubtract(tickstart); | ||
232 | |||
228 | if (DebugLevel >= 5) | 233 | if (DebugLevel >= 5) |
229 | LogOutgoingDetail(strBuffer); | 234 | LogOutgoingDetail(strBuffer); |
230 | 235 | ||
@@ -243,13 +248,19 @@ namespace OpenSim.Framework | |||
243 | // gets written on the strteam upon Dispose() | 248 | // gets written on the strteam upon Dispose() |
244 | } | 249 | } |
245 | byte[] buf = ms.ToArray(); | 250 | byte[] buf = ms.ToArray(); |
251 | |||
252 | tickcompressdata = Util.EnvironmentTickCountSubtract(tickstart); | ||
253 | |||
246 | request.ContentLength = buf.Length; //Count bytes to send | 254 | request.ContentLength = buf.Length; //Count bytes to send |
255 | compsize = buf.Length; | ||
247 | using (Stream requestStream = request.GetRequestStream()) | 256 | using (Stream requestStream = request.GetRequestStream()) |
248 | requestStream.Write(buf, 0, (int)buf.Length); | 257 | requestStream.Write(buf, 0, (int)buf.Length); |
249 | } | 258 | } |
250 | } | 259 | } |
251 | else | 260 | else |
252 | { | 261 | { |
262 | tickcompressdata = tickJsondata; | ||
263 | compsize = buffer.Length; | ||
253 | request.ContentType = "application/json"; | 264 | request.ContentType = "application/json"; |
254 | request.ContentLength = buffer.Length; //Count bytes to send | 265 | request.ContentLength = buffer.Length; //Count bytes to send |
255 | using (Stream requestStream = request.GetRequestStream()) | 266 | using (Stream requestStream = request.GetRequestStream()) |
@@ -291,12 +302,16 @@ namespace OpenSim.Framework | |||
291 | int tickdiff = Util.EnvironmentTickCountSubtract(tickstart); | 302 | int tickdiff = Util.EnvironmentTickCountSubtract(tickstart); |
292 | if (tickdiff > LongCallTime) | 303 | if (tickdiff > LongCallTime) |
293 | m_log.InfoFormat( | 304 | m_log.InfoFormat( |
294 | "[WEB UTIL]: Slow ServiceOSD request {0} {1} {2} took {3}ms, {4}ms writing, {5}", | 305 | "[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}", |
295 | reqnum, | 306 | reqnum, |
296 | method, | 307 | method, |
297 | url, | 308 | url, |
298 | tickdiff, | 309 | tickdiff, |
299 | tickdata, | 310 | tickdata, |
311 | tickJsondata, | ||
312 | tickcompressdata, | ||
313 | compsize, | ||
314 | strBuffer != null ? strBuffer.Length : 0, | ||
300 | strBuffer != null | 315 | strBuffer != null |
301 | ? (strBuffer.Length > MaxRequestDiagLength ? strBuffer.Remove(MaxRequestDiagLength) : strBuffer) | 316 | ? (strBuffer.Length > MaxRequestDiagLength ? strBuffer.Remove(MaxRequestDiagLength) : strBuffer) |
302 | : ""); | 317 | : ""); |