Add inventory.<url>.RequestsMade stat.
This gives a count of all requests made to the remote inventory service. This is finer grained than inventory.httpfetch.ProcessedFetchInventoryRequests since such a request can be comprised of many individual inv service calls. In addition, this will count requests that don't go through the HTTP inventory fetch (e.g. HG, archiving, etc.)bullet-2.82
parent
56a623ac0c
commit
327632dc66
|
@ -34,6 +34,7 @@ using Nini.Config;
|
|||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.Console;
|
||||
using OpenSim.Framework.Communications;
|
||||
using OpenSim.Framework.Monitoring;
|
||||
using OpenSim.Services.Interfaces;
|
||||
using OpenSim.Server.Base;
|
||||
using OpenMetaverse;
|
||||
|
@ -46,6 +47,11 @@ namespace OpenSim.Services.Connectors
|
|||
LogManager.GetLogger(
|
||||
MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
/// <summary>
|
||||
/// Number of requests made to the remote inventory service.
|
||||
/// </summary>
|
||||
public int RequestsMade { get; private set; }
|
||||
|
||||
private string m_ServerURI = String.Empty;
|
||||
|
||||
/// <summary>
|
||||
|
@ -93,6 +99,19 @@ namespace OpenSim.Services.Connectors
|
|||
m_ServerURI = serviceURI;
|
||||
|
||||
m_requestTimeoutSecs = config.GetInt("RemoteRequestTimeout", m_requestTimeoutSecs);
|
||||
|
||||
StatsManager.RegisterStat(
|
||||
new Stat(
|
||||
"RequestsMade",
|
||||
"Requests made",
|
||||
"Number of requests made to the remove inventory service",
|
||||
"requests",
|
||||
"inventory",
|
||||
serviceURI,
|
||||
StatType.Pull,
|
||||
MeasuresOfInterest.AverageChangeOverTime,
|
||||
s => s.Value = RequestsMade,
|
||||
StatVerbosity.Debug));
|
||||
}
|
||||
|
||||
private bool CheckReturn(Dictionary<string, object> ret)
|
||||
|
@ -512,6 +531,8 @@ namespace OpenSim.Services.Connectors
|
|||
foreach (KeyValuePair<string, object> kvp in temp)
|
||||
sendData.Add(kvp.Key, kvp.Value);
|
||||
|
||||
RequestsMade++;
|
||||
|
||||
string reply = string.Empty;
|
||||
lock (m_Lock)
|
||||
reply = SynchronousRestFormsRequester.MakeRequest("POST",
|
||||
|
|
|
@ -823,6 +823,7 @@
|
|||
<Reference name="OpenSim.Capabilities"/>
|
||||
<Reference name="OpenSim.Framework.Communications"/>
|
||||
<Reference name="OpenSim.Framework.Console"/>
|
||||
<Reference name="OpenSim.Framework.Monitoring"/>
|
||||
<Reference name="OpenSim.Framework.Servers.HttpServer"/>
|
||||
<Reference name="OpenSim.Region.Framework"/>
|
||||
<Reference name="OpenSim.Server.Base"/>
|
||||
|
|
Loading…
Reference in New Issue