mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
Merge branch 'avination' into careminster
Conflicts: OpenSim/Framework/WebUtil.cs OpenSim/Region/Physics/OdePlugin/OdeScene.cs
This commit is contained in:
@@ -733,7 +733,8 @@ namespace OpenSim.Framework
|
||||
reqnum, verb, requestUrl);
|
||||
|
||||
int tickstart = Util.EnvironmentTickCount();
|
||||
int tickdata = 0;
|
||||
// int tickdata = 0;
|
||||
int tickdiff = 0;
|
||||
|
||||
Type type = typeof(TRequest);
|
||||
|
||||
@@ -776,8 +777,8 @@ namespace OpenSim.Framework
|
||||
requestStream.Close();
|
||||
|
||||
// capture how much time was spent writing
|
||||
tickdata = Util.EnvironmentTickCountSubtract(tickstart);
|
||||
|
||||
// useless in this async
|
||||
// tickdata = Util.EnvironmentTickCountSubtract(tickstart);
|
||||
request.BeginGetResponse(delegate(IAsyncResult ar)
|
||||
{
|
||||
response = request.EndGetResponse(ar);
|
||||
@@ -794,7 +795,8 @@ namespace OpenSim.Framework
|
||||
finally
|
||||
{
|
||||
// Let's not close this
|
||||
//buffer.Close();
|
||||
// yes do close it
|
||||
buffer.Close();
|
||||
respStream.Close();
|
||||
response.Close();
|
||||
}
|
||||
@@ -862,7 +864,6 @@ namespace OpenSim.Framework
|
||||
}
|
||||
|
||||
// m_log.DebugFormat("[ASYNC REQUEST]: Received {0}", deserial.ToString());
|
||||
|
||||
try
|
||||
{
|
||||
action(deserial);
|
||||
@@ -877,9 +878,10 @@ namespace OpenSim.Framework
|
||||
}, null);
|
||||
}
|
||||
|
||||
int tickdiff = Util.EnvironmentTickCountSubtract(tickstart);
|
||||
tickdiff = Util.EnvironmentTickCountSubtract(tickstart);
|
||||
if (tickdiff > WebUtil.LongCallTime)
|
||||
{
|
||||
/*
|
||||
string originalRequest = null;
|
||||
|
||||
if (buffer != null)
|
||||
@@ -898,12 +900,19 @@ namespace OpenSim.Framework
|
||||
tickdiff,
|
||||
tickdata,
|
||||
originalRequest);
|
||||
*/
|
||||
m_log.InfoFormat(
|
||||
"[ASYNC REQUEST]: Slow WebRequest SETUP <{0}> {1} {2} took {3}ms",
|
||||
reqnum,
|
||||
verb,
|
||||
requestUrl,
|
||||
tickdiff);
|
||||
}
|
||||
else if (WebUtil.DebugLevel >= 4)
|
||||
{
|
||||
m_log.DebugFormat(
|
||||
"[WEB UTIL]: HTTP OUT {0} took {1}ms, {2}ms writing",
|
||||
reqnum, tickdiff, tickdata);
|
||||
"[WEB UTIL]: HTTP OUT {0} took {1}ms",
|
||||
reqnum, tickdiff);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -938,6 +947,8 @@ namespace OpenSim.Framework
|
||||
request.Method = verb;
|
||||
string respstring = String.Empty;
|
||||
|
||||
int tickset = Util.EnvironmentTickCountSubtract(tickstart);
|
||||
|
||||
using (MemoryStream buffer = new MemoryStream())
|
||||
{
|
||||
if ((verb == "POST") || (verb == "PUT"))
|
||||
@@ -1019,6 +1030,7 @@ namespace OpenSim.Framework
|
||||
verb,
|
||||
requestUrl,
|
||||
tickdiff,
|
||||
tickset,
|
||||
tickdata,
|
||||
obj.Length > WebUtil.MaxRequestDiagLength ? obj.Remove(WebUtil.MaxRequestDiagLength) : obj);
|
||||
else if (WebUtil.DebugLevel >= 4)
|
||||
|
||||
Reference in New Issue
Block a user