aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Statistics/SimExtraStatsCollector.cs')
-rw-r--r--OpenSim/Framework/Statistics/SimExtraStatsCollector.cs19
1 files changed, 16 insertions, 3 deletions
diff --git a/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs b/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs
index cc64ed6..2f6bb7e 100644
--- a/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs
+++ b/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs
@@ -45,6 +45,7 @@ namespace OpenSim.Framework.Statistics
45 private long texturesInCache; 45 private long texturesInCache;
46 private long assetCacheMemoryUsage; 46 private long assetCacheMemoryUsage;
47 private long textureCacheMemoryUsage; 47 private long textureCacheMemoryUsage;
48 private TimeSpan assetRequestTimeAfterCacheMiss;
48 private long blockedMissingTextureRequests; 49 private long blockedMissingTextureRequests;
49 50
50 private long assetServiceRequestFailures; 51 private long assetServiceRequestFailures;
@@ -86,6 +87,11 @@ namespace OpenSim.Framework.Statistics
86 public long TexturesInCache { get { return texturesInCache; } } 87 public long TexturesInCache { get { return texturesInCache; } }
87 public long AssetCacheMemoryUsage { get { return assetCacheMemoryUsage; } } 88 public long AssetCacheMemoryUsage { get { return assetCacheMemoryUsage; } }
88 public long TextureCacheMemoryUsage { get { return textureCacheMemoryUsage; } } 89 public long TextureCacheMemoryUsage { get { return textureCacheMemoryUsage; } }
90
91 /// <summary>
92 /// This is the time it took for the last asset request made in response to a cache miss.
93 /// </summary>
94 public TimeSpan AssetRequestTimeAfterCacheMiss { get { return assetRequestTimeAfterCacheMiss; } }
89 95
90 /// <summary> 96 /// <summary>
91 /// Number of persistent requests for missing textures we have started blocking from clients. To some extent 97 /// Number of persistent requests for missing textures we have started blocking from clients. To some extent
@@ -148,7 +154,7 @@ namespace OpenSim.Framework.Statistics
148 } 154 }
149 155
150 /// <summary> 156 /// <summary>
151 /// Signal that the asset cache can be cleared. 157 /// Signal that the asset cache has been cleared.
152 /// </summary> 158 /// </summary>
153 public void ClearAssetCacheStatistics() 159 public void ClearAssetCacheStatistics()
154 { 160 {
@@ -157,6 +163,11 @@ namespace OpenSim.Framework.Statistics
157 texturesInCache = 0; 163 texturesInCache = 0;
158 textureCacheMemoryUsage = 0; 164 textureCacheMemoryUsage = 0;
159 } 165 }
166
167 public void AddAssetRequestTimeAfterCacheMiss(TimeSpan ts)
168 {
169 assetRequestTimeAfterCacheMiss = ts;
170 }
160 171
161 public void AddBlockedMissingTextureRequest() 172 public void AddBlockedMissingTextureRequest()
162 { 173 {
@@ -245,10 +256,12 @@ namespace OpenSim.Framework.Statistics
245 string.Format( 256 string.Format(
246@"Asset cache contains {0,6} non-texture assets using {1,10} K 257@"Asset cache contains {0,6} non-texture assets using {1,10} K
247Texture cache contains {2,6} texture assets using {3,10} K 258Texture cache contains {2,6} texture assets using {3,10} K
248Blocked client requests for missing textures: {4} 259Latest asset request time after cache miss: {4}s
249Asset service request failures: {5}"+ Environment.NewLine, 260Blocked client requests for missing textures: {5}
261Asset service request failures: {6}"+ Environment.NewLine,
250 AssetsInCache, Math.Round(AssetCacheMemoryUsage / 1024.0), 262 AssetsInCache, Math.Round(AssetCacheMemoryUsage / 1024.0),
251 TexturesInCache, Math.Round(TextureCacheMemoryUsage / 1024.0), 263 TexturesInCache, Math.Round(TextureCacheMemoryUsage / 1024.0),
264 assetRequestTimeAfterCacheMiss.Milliseconds / 1000.0,
252 BlockedMissingTextureRequests, 265 BlockedMissingTextureRequests,
253 AssetServiceRequestFailures)); 266 AssetServiceRequestFailures));
254 267