diff options
Diffstat (limited to 'OpenSim/Services/Connectors/Inventory')
-rw-r--r-- | OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs b/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs index b914737..93f9d48 100644 --- a/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs +++ b/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs | |||
@@ -34,6 +34,7 @@ using Nini.Config; | |||
34 | using OpenSim.Framework; | 34 | using OpenSim.Framework; |
35 | using OpenSim.Framework.Console; | 35 | using OpenSim.Framework.Console; |
36 | using OpenSim.Framework.Communications; | 36 | using OpenSim.Framework.Communications; |
37 | using OpenSim.Framework.Monitoring; | ||
37 | using OpenSim.Services.Interfaces; | 38 | using OpenSim.Services.Interfaces; |
38 | using OpenSim.Server.Base; | 39 | using OpenSim.Server.Base; |
39 | using OpenMetaverse; | 40 | using OpenMetaverse; |
@@ -46,6 +47,11 @@ namespace OpenSim.Services.Connectors | |||
46 | LogManager.GetLogger( | 47 | LogManager.GetLogger( |
47 | MethodBase.GetCurrentMethod().DeclaringType); | 48 | MethodBase.GetCurrentMethod().DeclaringType); |
48 | 49 | ||
50 | /// <summary> | ||
51 | /// Number of requests made to the remote inventory service. | ||
52 | /// </summary> | ||
53 | public int RequestsMade { get; private set; } | ||
54 | |||
49 | private string m_ServerURI = String.Empty; | 55 | private string m_ServerURI = String.Empty; |
50 | 56 | ||
51 | /// <summary> | 57 | /// <summary> |
@@ -93,6 +99,19 @@ namespace OpenSim.Services.Connectors | |||
93 | m_ServerURI = serviceURI; | 99 | m_ServerURI = serviceURI; |
94 | 100 | ||
95 | m_requestTimeoutSecs = config.GetInt("RemoteRequestTimeout", m_requestTimeoutSecs); | 101 | m_requestTimeoutSecs = config.GetInt("RemoteRequestTimeout", m_requestTimeoutSecs); |
102 | |||
103 | StatsManager.RegisterStat( | ||
104 | new Stat( | ||
105 | "RequestsMade", | ||
106 | "Requests made", | ||
107 | "Number of requests made to the remove inventory service", | ||
108 | "requests", | ||
109 | "inventory", | ||
110 | serviceURI, | ||
111 | StatType.Pull, | ||
112 | MeasuresOfInterest.AverageChangeOverTime, | ||
113 | s => s.Value = RequestsMade, | ||
114 | StatVerbosity.Debug)); | ||
96 | } | 115 | } |
97 | 116 | ||
98 | private bool CheckReturn(Dictionary<string, object> ret) | 117 | private bool CheckReturn(Dictionary<string, object> ret) |
@@ -512,6 +531,8 @@ namespace OpenSim.Services.Connectors | |||
512 | foreach (KeyValuePair<string, object> kvp in temp) | 531 | foreach (KeyValuePair<string, object> kvp in temp) |
513 | sendData.Add(kvp.Key, kvp.Value); | 532 | sendData.Add(kvp.Key, kvp.Value); |
514 | 533 | ||
534 | RequestsMade++; | ||
535 | |||
515 | string reply = string.Empty; | 536 | string reply = string.Empty; |
516 | lock (m_Lock) | 537 | lock (m_Lock) |
517 | reply = SynchronousRestFormsRequester.MakeRequest("POST", | 538 | reply = SynchronousRestFormsRequester.MakeRequest("POST", |