aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-09-21 20:29:06 +0000
committerJustin Clarke Casey2008-09-21 20:29:06 +0000
commit8fb3523ef74f87995a4c791212e7dbefe8134a61 (patch)
tree2c321c152732d5169b46efbeb134f49dad80c654 /OpenSim/Framework/Statistics/SimExtraStatsCollector.cs
parent* Eliminate the need to copy asset request lists in the asset cache when an a... (diff)
downloadopensim-SC_OLD-8fb3523ef74f87995a4c791212e7dbefe8134a61.zip
opensim-SC_OLD-8fb3523ef74f87995a4c791212e7dbefe8134a61.tar.gz
opensim-SC_OLD-8fb3523ef74f87995a4c791212e7dbefe8134a61.tar.bz2
opensim-SC_OLD-8fb3523ef74f87995a4c791212e7dbefe8134a61.tar.xz
* Start recording asset request times after a cache miss. This is very primtive at the moment - only the last time is kept for some classes of request
* This can be seen as "Latest asset request time after cache miss" in show stats on the region console
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