aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-05-03 01:45:49 +0100
committerJustin Clark-Casey (justincc)2012-05-03 01:45:49 +0100
commit231a3bf147315a9284140476d2b09e13c3fee1c0 (patch)
treef04ffb5bb43d919c1687af57e4cb48829f6dc437 /OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
parentComment out the five second sleep in etm.DoTeleport() if the old agent needs ... (diff)
downloadopensim-SC_OLD-231a3bf147315a9284140476d2b09e13c3fee1c0.zip
opensim-SC_OLD-231a3bf147315a9284140476d2b09e13c3fee1c0.tar.gz
opensim-SC_OLD-231a3bf147315a9284140476d2b09e13c3fee1c0.tar.bz2
opensim-SC_OLD-231a3bf147315a9284140476d2b09e13c3fee1c0.tar.xz
Implement optional name and description on http stream handlers so that we can relate a slow request to what the handler actually does and the agent it serves, if applicable.
This is most useful for capabilities where the url is not self-describing.
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs16
1 files changed, 12 insertions, 4 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
index 0fbf90a..4ea4a1a 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
@@ -156,7 +156,7 @@ namespace OpenSim.Framework.Servers.HttpServer
156 } 156 }
157 } 157 }
158 158
159 public List<string> GetStreamHandlerKeys() 159 public List<string> GetStreamHandlerKeys()
160 { 160 {
161 lock (m_streamHandlers) 161 lock (m_streamHandlers)
162 return new List<string>(m_streamHandlers.Keys); 162 return new List<string>(m_streamHandlers.Keys);
@@ -410,6 +410,8 @@ namespace OpenSim.Framework.Servers.HttpServer
410// string reqnum = "unknown"; 410// string reqnum = "unknown";
411 int tickstart = Environment.TickCount; 411 int tickstart = Environment.TickCount;
412 412
413 IRequestHandler requestHandler = null;
414
413 try 415 try
414 { 416 {
415 // OpenSim.Framework.WebUtil.OSHeaderRequestID 417 // OpenSim.Framework.WebUtil.OSHeaderRequestID
@@ -438,8 +440,6 @@ namespace OpenSim.Framework.Servers.HttpServer
438 //response.KeepAlive = true; 440 //response.KeepAlive = true;
439 response.SendChunked = false; 441 response.SendChunked = false;
440 442
441 IRequestHandler requestHandler;
442
443 string path = request.RawUrl; 443 string path = request.RawUrl;
444 string handlerKey = GetHandlerKey(request.HttpMethod, path); 444 string handlerKey = GetHandlerKey(request.HttpMethod, path);
445 445
@@ -675,8 +675,16 @@ namespace OpenSim.Framework.Servers.HttpServer
675 // since its just for reporting, tickdiff limit can be adjusted 675 // since its just for reporting, tickdiff limit can be adjusted
676 int tickdiff = Environment.TickCount - tickstart; 676 int tickdiff = Environment.TickCount - tickstart;
677 if (tickdiff > 3000) 677 if (tickdiff > 3000)
678 {
678 m_log.InfoFormat( 679 m_log.InfoFormat(
679 "[BASE HTTP SERVER]: slow {0} request for {1} from {2} took {3} ms", requestMethod, uriString, request.RemoteIPEndPoint.ToString(), tickdiff); 680 "[BASE HTTP SERVER]: slow {0} for {1} {2} {3} from {4} took {5} ms",
681 requestMethod,
682 uriString,
683 requestHandler != null ? requestHandler.Name : "",
684 requestHandler != null ? requestHandler.Description : "",
685 request.RemoteIPEndPoint.ToString(),
686 tickdiff);
687 }
680 } 688 }
681 } 689 }
682 690