diff --git a/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs b/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs index 2beb3a0bc4..3716f9bae7 100644 --- a/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs +++ b/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs @@ -43,11 +43,20 @@ namespace OpenSim.Framework.Statistics private long assetCacheMemoryUsage; private long textureCacheMemoryUsage; + private long inventoryServiceRetrievalFailures; + public long AssetsInCache { get { return assetsInCache; } } public long TexturesInCache { get { return texturesInCache; } } public long AssetCacheMemoryUsage { get { return assetCacheMemoryUsage; } } public long TextureCacheMemoryUsage { get { return textureCacheMemoryUsage; } } + /// + /// Number of known failures to retrieve avatar inventory from the inventory service. This does not + /// cover situations where the inventory service accepts the request but never returns any data, since + /// we do not yet timeout this situation. + /// + public long InventoryServiceRetrievalFailures { get { return inventoryServiceRetrievalFailures; } } + /// /// Retain a dictionary of all packet queues stats reporters /// @@ -70,6 +79,11 @@ namespace OpenSim.Framework.Statistics } } + public void AddInventoryServiceRetrievalFailure() + { + inventoryServiceRetrievalFailures++; + } + /// /// Register as a packet queue stats provider /// @@ -110,7 +124,15 @@ namespace OpenSim.Framework.Statistics Texture cache contains {2,6} textures using {3,10:0.000}K" + Environment.NewLine, AssetsInCache, AssetCacheMemoryUsage / 1024.0, TexturesInCache, TextureCacheMemoryUsage / 1024.0)); - + + sb.Append(Environment.NewLine); + sb.Append("INVENTORY STATISTICS"); + sb.Append(Environment.NewLine); + sb.Append( + string.Format( + "Initial inventory caching failures: {0}" + Environment.NewLine, + InventoryServiceRetrievalFailures)); + sb.Append(Environment.NewLine); sb.Append("PACKET QUEUE STATISTICS"); sb.Append(Environment.NewLine); diff --git a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs index f7037ea8d5..0f75a094c6 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs @@ -35,6 +35,7 @@ using OpenSim.Framework; using OpenSim.Framework.Communications; using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Servers; +using OpenSim.Framework.Statistics; namespace OpenSim.Region.Communications.OGS1 { @@ -79,8 +80,11 @@ namespace OpenSim.Region.Communications.OGS1 } catch (WebException e) { + if (StatsManager.SimExtraStats != null) + StatsManager.SimExtraStats.AddInventoryServiceRetrievalFailure(); + m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Request inventory operation failed, {0} {1}", - e.Source, e.Message); + e.Source, e.Message); } } else diff --git a/prebuild.xml b/prebuild.xml index 65c3452d49..a00c54797e 100644 --- a/prebuild.xml +++ b/prebuild.xml @@ -722,9 +722,10 @@ + - +