From 1b7b664c8696531fec26378d1386362d8a3da55e Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Mon, 15 Jul 2013 23:22:39 +0100
Subject: Add request received/handling stats for caps which are served by http
poll handlers.
This adds explicit cap poll handler supporting to the Caps classes rather than relying on callers to do the complicated coding.
Other refactoring was required to get logic into the right places to support this.
---
.../Framework/Servers/HttpServer/PollServiceEventArgs.cs | 14 ++++++++++++++
1 file changed, 14 insertions(+)
(limited to 'OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs')
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs
index 3079a7e..020bfd5 100644
--- a/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs
+++ b/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs
@@ -55,12 +55,26 @@ namespace OpenSim.Framework.Servers.HttpServer
Inventory = 2
}
+ public string Url { get; set; }
+
+ ///
+ /// Number of requests received for this poll service.
+ ///
+ public int RequestsReceived { get; set; }
+
+ ///
+ /// Number of requests handled by this poll service.
+ ///
+ public int RequestsHandled { get; set; }
+
public PollServiceEventArgs(
RequestMethod pRequest,
+ string pUrl,
HasEventsMethod pHasEvents, GetEventsMethod pGetEvents, NoEventsMethod pNoEvents,
UUID pId, int pTimeOutms)
{
Request = pRequest;
+ Url = pUrl;
HasEvents = pHasEvents;
GetEvents = pGetEvents;
NoEvents = pNoEvents;
--
cgit v1.1
From e46459ef21e1ee5ceaeca70365a7c881d33b09ce Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Wed, 17 Jul 2013 11:19:36 -0700
Subject: Cleared up much confusion in PollServiceRequestManager. Here's the
history: When Melanie added the web fetch inventory throttle to core, she
made the long poll requests (EQs) effectively be handled on an active loop.
All those requests, if they existed, were being constantly dequeued, checked
for events (which most often they didn't have), and requeued again. This was
an active loop thread on a 100ms cycle! This fixes the issue. Now the
inventory requests, if they aren't ready to be served, are placed directly
back in the queue, but the long poll requests aren't placed there until there
are events ready to be sent or timeout has been reached. This puts the
LongPollServiceWatcherThread back to 1sec cycle, as it was before.
---
OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs')
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs
index 020bfd5..9477100 100644
--- a/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs
+++ b/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs
@@ -50,7 +50,7 @@ namespace OpenSim.Framework.Servers.HttpServer
public enum EventType : int
{
- Normal = 0,
+ LongPoll = 0,
LslHttp = 1,
Inventory = 2
}
@@ -80,7 +80,7 @@ namespace OpenSim.Framework.Servers.HttpServer
NoEvents = pNoEvents;
Id = pId;
TimeOutms = pTimeOutms;
- Type = EventType.Normal;
+ Type = EventType.LongPoll;
}
}
}
--
cgit v1.1
From fa2370b32ee57a07f27501152c3c705a883b13d8 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Wed, 17 Jul 2013 15:05:36 -0700
Subject: Revert "Cleared up much confusion in PollServiceRequestManager.
Here's the history:"
This reverts commit e46459ef21e1ee5ceaeca70365a7c881d33b09ce.
---
OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs')
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs
index 9477100..020bfd5 100644
--- a/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs
+++ b/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs
@@ -50,7 +50,7 @@ namespace OpenSim.Framework.Servers.HttpServer
public enum EventType : int
{
- LongPoll = 0,
+ Normal = 0,
LslHttp = 1,
Inventory = 2
}
@@ -80,7 +80,7 @@ namespace OpenSim.Framework.Servers.HttpServer
NoEvents = pNoEvents;
Id = pId;
TimeOutms = pTimeOutms;
- Type = EventType.LongPoll;
+ Type = EventType.Normal;
}
}
}
--
cgit v1.1
From 9e35b069a43942285214ff485c8f5ffb53e7c5ec Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Thu, 18 Jul 2013 12:23:27 -0700
Subject: Reverting the reverts I did yesterday. cpu-branch has now been
successfully tested, and I'm merging back those changes, which proved to be
good. Revert "Revert "Cleared up much confusion in PollServiceRequestManager.
Here's the history:""
This reverts commit fa2370b32ee57a07f27501152c3c705a883b13d8.
---
OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs')
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs
index 020bfd5..9477100 100644
--- a/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs
+++ b/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs
@@ -50,7 +50,7 @@ namespace OpenSim.Framework.Servers.HttpServer
public enum EventType : int
{
- Normal = 0,
+ LongPoll = 0,
LslHttp = 1,
Inventory = 2
}
@@ -80,7 +80,7 @@ namespace OpenSim.Framework.Servers.HttpServer
NoEvents = pNoEvents;
Id = pId;
TimeOutms = pTimeOutms;
- Type = EventType.Normal;
+ Type = EventType.LongPoll;
}
}
}
--
cgit v1.1