avoid a data copy
parent
79234795fd
commit
66f3c6c730
|
@ -48,12 +48,9 @@ namespace OpenSim.Framework.Monitoring
|
||||||
Math.Round(GC.GetTotalMemory(false) / 1024.0 / 1024.0));
|
Math.Round(GC.GetTotalMemory(false) / 1024.0 / 1024.0));
|
||||||
|
|
||||||
sb.AppendFormat(
|
sb.AppendFormat(
|
||||||
"Last heap allocation rate : {0} MB/s\n",
|
"Heap allocation rate (last/avg): {0}/{1}MB/s\n",
|
||||||
Math.Round((MemoryWatchdog.LastHeapAllocationRate * 1000) / 1024.0 / 1024, 3));
|
Math.Round((MemoryWatchdog.LastHeapAllocationRate * 1000) / 1048576.0, 3),
|
||||||
|
Math.Round((MemoryWatchdog.AverageHeapAllocationRate * 1000) / 1048576.0, 3));
|
||||||
sb.AppendFormat(
|
|
||||||
"Average heap allocation rate: {0} MB/s\n",
|
|
||||||
Math.Round((MemoryWatchdog.AverageHeapAllocationRate * 1000) / 1024.0 / 1024, 3));
|
|
||||||
|
|
||||||
Process myprocess = Process.GetCurrentProcess();
|
Process myprocess = Process.GetCurrentProcess();
|
||||||
// if (!myprocess.HasExited)
|
// if (!myprocess.HasExited)
|
||||||
|
|
|
@ -843,7 +843,10 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
if (!response.SendChunked && response.ContentLength64 <= 0)
|
if (!response.SendChunked && response.ContentLength64 <= 0)
|
||||||
response.ContentLength64 = buffer.LongLength;
|
response.ContentLength64 = buffer.LongLength;
|
||||||
|
|
||||||
response.OutputStream.Write(buffer, 0, buffer.Length);
|
//response.OutputStream.Write(buffer, 0, buffer.Length);
|
||||||
|
response.RawBufferStart = 0;
|
||||||
|
response.RawBufferLen = buffer.Length;
|
||||||
|
response.RawBuffer = buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do not include the time taken to actually send the response to the caller in the measurement
|
// Do not include the time taken to actually send the response to the caller in the measurement
|
||||||
|
@ -851,7 +854,9 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
// server
|
// server
|
||||||
requestEndTick = Environment.TickCount;
|
requestEndTick = Environment.TickCount;
|
||||||
|
|
||||||
|
buffer = null;
|
||||||
response.Send();
|
response.Send();
|
||||||
|
response.RawBuffer = null;
|
||||||
}
|
}
|
||||||
catch (SocketException e)
|
catch (SocketException e)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue