aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs21
-rw-r--r--prebuild.xml1
2 files changed, 22 insertions, 0 deletions
diff --git a/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs b/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs
index f86d2f1..fd309a0 100644
--- a/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs
+++ b/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs
@@ -34,6 +34,7 @@ using Nini.Config;
34using OpenSim.Framework; 34using OpenSim.Framework;
35using OpenSim.Framework.Console; 35using OpenSim.Framework.Console;
36using OpenSim.Framework.Communications; 36using OpenSim.Framework.Communications;
37using OpenSim.Framework.Monitoring;
37using OpenSim.Services.Interfaces; 38using OpenSim.Services.Interfaces;
38using OpenSim.Server.Base; 39using OpenSim.Server.Base;
39using OpenMetaverse; 40using 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 private object m_Lock = new object(); 57 private object m_Lock = new object();
@@ -83,6 +89,19 @@ namespace OpenSim.Services.Connectors
83 throw new Exception("Inventory connector init error"); 89 throw new Exception("Inventory connector init error");
84 } 90 }
85 m_ServerURI = serviceURI; 91 m_ServerURI = serviceURI;
92
93 StatsManager.RegisterStat(
94 new Stat(
95 "RequestsMade",
96 "Requests made",
97 "Number of requests made to the remove inventory service",
98 "requests",
99 "inventory",
100 serviceURI,
101 StatType.Pull,
102 MeasuresOfInterest.AverageChangeOverTime,
103 s => s.Value = RequestsMade,
104 StatVerbosity.Debug));
86 } 105 }
87 106
88 private bool CheckReturn(Dictionary<string, object> ret) 107 private bool CheckReturn(Dictionary<string, object> ret)
@@ -502,6 +521,8 @@ namespace OpenSim.Services.Connectors
502 foreach (KeyValuePair<string, object> kvp in temp) 521 foreach (KeyValuePair<string, object> kvp in temp)
503 sendData.Add(kvp.Key, kvp.Value); 522 sendData.Add(kvp.Key, kvp.Value);
504 523
524 RequestsMade++;
525
505 string reply = string.Empty; 526 string reply = string.Empty;
506 lock (m_Lock) 527 lock (m_Lock)
507 reply = SynchronousRestFormsRequester.MakeRequest("POST", 528 reply = SynchronousRestFormsRequester.MakeRequest("POST",
diff --git a/prebuild.xml b/prebuild.xml
index 8137d1f..001c16c 100644
--- a/prebuild.xml
+++ b/prebuild.xml
@@ -823,6 +823,7 @@
823 <Reference name="OpenSim.Capabilities"/> 823 <Reference name="OpenSim.Capabilities"/>
824 <Reference name="OpenSim.Framework.Communications"/> 824 <Reference name="OpenSim.Framework.Communications"/>
825 <Reference name="OpenSim.Framework.Console"/> 825 <Reference name="OpenSim.Framework.Console"/>
826 <Reference name="OpenSim.Framework.Monitoring"/>
826 <Reference name="OpenSim.Framework.Servers.HttpServer"/> 827 <Reference name="OpenSim.Framework.Servers.HttpServer"/>
827 <Reference name="OpenSim.Region.Framework"/> 828 <Reference name="OpenSim.Region.Framework"/>
828 <Reference name="OpenSim.Server.Base"/> 829 <Reference name="OpenSim.Server.Base"/>