aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetServerBase.cs8
-rw-r--r--OpenSim/Framework/Statistics/SimExtraStatsCollector.cs33
2 files changed, 27 insertions, 14 deletions
diff --git a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs
index 053cb0f..74b1976 100644
--- a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs
@@ -31,6 +31,7 @@ using System.Threading;
31using libsecondlife; 31using libsecondlife;
32using log4net; 32using log4net;
33using OpenSim.Framework.AssetLoader.Filesystem; 33using OpenSim.Framework.AssetLoader.Filesystem;
34using OpenSim.Framework.Statistics;
34 35
35namespace OpenSim.Framework.Communications.Cache 36namespace OpenSim.Framework.Communications.Cache
36{ 37{
@@ -80,6 +81,9 @@ namespace OpenSim.Framework.Communications.Cache
80 { 81 {
81 m_log.ErrorFormat("[ASSET]: Asset request for {0} threw exception {1}", req.AssetID, e); 82 m_log.ErrorFormat("[ASSET]: Asset request for {0} threw exception {1}", req.AssetID, e);
82 83
84 if (StatsManager.SimExtraStats != null)
85 StatsManager.SimExtraStats.AddAssetServiceRequestFailure();
86
83 m_receiver.AssetNotFound(req.AssetID, req.IsTexture); 87 m_receiver.AssetNotFound(req.AssetID, req.IsTexture);
84 88
85 return; 89 return;
@@ -87,13 +91,13 @@ namespace OpenSim.Framework.Communications.Cache
87 91
88 if (asset != null) 92 if (asset != null)
89 { 93 {
90 m_log.DebugFormat("[ASSET]: Asset {0} received from asset server", req.AssetID); 94 //m_log.DebugFormat("[ASSET]: Asset {0} received from asset server", req.AssetID);
91 95
92 m_receiver.AssetReceived(asset, req.IsTexture); 96 m_receiver.AssetReceived(asset, req.IsTexture);
93 } 97 }
94 else 98 else
95 { 99 {
96 m_log.WarnFormat("[ASSET]: Asset {0} not found by asset server", req.AssetID); 100 //m_log.WarnFormat("[ASSET]: Asset {0} not found by asset server", req.AssetID);
97 101
98 m_receiver.AssetNotFound(req.AssetID, req.IsTexture); 102 m_receiver.AssetNotFound(req.AssetID, req.IsTexture);
99 } 103 }
diff --git a/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs b/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs
index 6c67c9e..968ed3f 100644
--- a/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs
+++ b/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs
@@ -46,6 +46,7 @@ namespace OpenSim.Framework.Statistics
46 private long textureCacheMemoryUsage; 46 private long textureCacheMemoryUsage;
47 private long blockedMissingTextureRequests; 47 private long blockedMissingTextureRequests;
48 48
49 private long assetServiceRequestFailures;
49 private long inventoryServiceRetrievalFailures; 50 private long inventoryServiceRetrievalFailures;
50 51
51 /// <summary> 52 /// <summary>
@@ -72,6 +73,13 @@ namespace OpenSim.Framework.Statistics
72 public long BlockedMissingTextureRequests { get { return blockedMissingTextureRequests; } } 73 public long BlockedMissingTextureRequests { get { return blockedMissingTextureRequests; } }
73 74
74 /// <summary> 75 /// <summary>
76 /// Record the number of times that an asset request has failed. Failures are effectively exceptions, such as
77 /// request timeouts. If an asset service replies that a particular asset cannot be found, this is not counted
78 /// as a failure
79 /// </summary>
80 public long AssetServiceRequestFailures { get { return assetServiceRequestFailures; } }
81
82 /// <summary>
75 /// Number of known failures to retrieve avatar inventory from the inventory service. This does not 83 /// Number of known failures to retrieve avatar inventory from the inventory service. This does not
76 /// cover situations where the inventory service accepts the request but never returns any data, since 84 /// cover situations where the inventory service accepts the request but never returns any data, since
77 /// we do not yet timeout this situation. 85 /// we do not yet timeout this situation.
@@ -122,6 +130,11 @@ namespace OpenSim.Framework.Statistics
122 blockedMissingTextureRequests++; 130 blockedMissingTextureRequests++;
123 } 131 }
124 132
133 public void AddAssetServiceRequestFailure()
134 {
135 assetServiceRequestFailures++;
136 }
137
125 public void AddInventoryServiceRetrievalFailure() 138 public void AddInventoryServiceRetrievalFailure()
126 { 139 {
127 inventoryServiceRetrievalFailures++; 140 inventoryServiceRetrievalFailures++;
@@ -163,18 +176,14 @@ namespace OpenSim.Framework.Statistics
163 sb.Append(Environment.NewLine); 176 sb.Append(Environment.NewLine);
164 sb.Append( 177 sb.Append(
165 string.Format( 178 string.Format(
166@"Asset cache contains {0,6} assets using {1,10} K" + Environment.NewLine, 179@"Asset cache contains {0,6} non-texture assets using {1,10} K
167 AssetsInCache, Math.Round(AssetCacheMemoryUsage / 1024.0))); 180Texture cache contains {2,6} texture assets using {3,10} K
168 181Blocked client requests for missing textures: {4}
169 sb.Append(Environment.NewLine); 182Asset service request failures: {5}"+ Environment.NewLine,
170 sb.Append("TEXTURE STATISTICS"); 183 AssetsInCache, Math.Round(AssetCacheMemoryUsage / 1024.0),
171 sb.Append(Environment.NewLine); 184 TexturesInCache, Math.Round(TextureCacheMemoryUsage / 1024.0),
172 sb.Append( 185 BlockedMissingTextureRequests,
173 string.Format( 186 AssetServiceRequestFailures));
174@"Texture cache contains {0,6} textures using {1,10} K
175Blocked requests for missing textures: {2}" + Environment.NewLine,
176 TexturesInCache, Math.Round(TextureCacheMemoryUsage / 1024.0),
177 BlockedMissingTextureRequests));
178 187
179 sb.Append(Environment.NewLine); 188 sb.Append(Environment.NewLine);
180 sb.Append("CONNECTION STATISTICS"); 189 sb.Append("CONNECTION STATISTICS");