diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Statistics/SimExtraStatsCollector.cs | 217 |
1 files changed, 109 insertions, 108 deletions
diff --git a/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs b/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs index 3035a62..a506e3b 100644 --- a/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs +++ b/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs | |||
@@ -42,15 +42,15 @@ namespace OpenSim.Framework.Statistics | |||
42 | { | 42 | { |
43 | private long abnormalClientThreadTerminations; | 43 | private long abnormalClientThreadTerminations; |
44 | 44 | ||
45 | private long assetsInCache; | 45 | // private long assetsInCache; |
46 | private long texturesInCache; | 46 | // private long texturesInCache; |
47 | private long assetCacheMemoryUsage; | 47 | // private long assetCacheMemoryUsage; |
48 | private long textureCacheMemoryUsage; | 48 | // private long textureCacheMemoryUsage; |
49 | private TimeSpan assetRequestTimeAfterCacheMiss; | 49 | // private TimeSpan assetRequestTimeAfterCacheMiss; |
50 | private long blockedMissingTextureRequests; | 50 | // private long blockedMissingTextureRequests; |
51 | 51 | ||
52 | private long assetServiceRequestFailures; | 52 | // private long assetServiceRequestFailures; |
53 | private long inventoryServiceRetrievalFailures; | 53 | // private long inventoryServiceRetrievalFailures; |
54 | 54 | ||
55 | private volatile float timeDilation; | 55 | private volatile float timeDilation; |
56 | private volatile float simFps; | 56 | private volatile float simFps; |
@@ -79,27 +79,27 @@ namespace OpenSim.Framework.Statistics | |||
79 | /// </summary> | 79 | /// </summary> |
80 | public long AbnormalClientThreadTerminations { get { return abnormalClientThreadTerminations; } } | 80 | public long AbnormalClientThreadTerminations { get { return abnormalClientThreadTerminations; } } |
81 | 81 | ||
82 | /// <summary> | 82 | // /// <summary> |
83 | /// These statistics are being collected by push rather than pull. Pull would be simpler, but I had the | 83 | // /// These statistics are being collected by push rather than pull. Pull would be simpler, but I had the |
84 | /// notion of providing some flow statistics (which pull wouldn't give us). Though admittedly these | 84 | // /// notion of providing some flow statistics (which pull wouldn't give us). Though admittedly these |
85 | /// haven't yet been implemented... | 85 | // /// haven't yet been implemented... |
86 | /// </summary> | 86 | // /// </summary> |
87 | public long AssetsInCache { get { return assetsInCache; } } | 87 | // public long AssetsInCache { get { return assetsInCache; } } |
88 | 88 | // | |
89 | /// <value> | 89 | // /// <value> |
90 | /// Currently unused | 90 | // /// Currently unused |
91 | /// </value> | 91 | // /// </value> |
92 | public long TexturesInCache { get { return texturesInCache; } } | 92 | // public long TexturesInCache { get { return texturesInCache; } } |
93 | 93 | // | |
94 | /// <value> | 94 | // /// <value> |
95 | /// Currently misleading since we can't currently subtract removed asset memory usage without a performance hit | 95 | // /// Currently misleading since we can't currently subtract removed asset memory usage without a performance hit |
96 | /// </value> | 96 | // /// </value> |
97 | public long AssetCacheMemoryUsage { get { return assetCacheMemoryUsage; } } | 97 | // public long AssetCacheMemoryUsage { get { return assetCacheMemoryUsage; } } |
98 | 98 | // | |
99 | /// <value> | 99 | // /// <value> |
100 | /// Currently unused | 100 | // /// Currently unused |
101 | /// </value> | 101 | // /// </value> |
102 | public long TextureCacheMemoryUsage { get { return textureCacheMemoryUsage; } } | 102 | // public long TextureCacheMemoryUsage { get { return textureCacheMemoryUsage; } } |
103 | 103 | ||
104 | public float TimeDilation { get { return timeDilation; } } | 104 | public float TimeDilation { get { return timeDilation; } } |
105 | public float SimFps { get { return simFps; } } | 105 | public float SimFps { get { return simFps; } } |
@@ -123,25 +123,25 @@ namespace OpenSim.Framework.Statistics | |||
123 | public float ActiveScripts { get { return activeScripts; } } | 123 | public float ActiveScripts { get { return activeScripts; } } |
124 | public float ScriptLinesPerSecond { get { return scriptLinesPerSecond; } } | 124 | public float ScriptLinesPerSecond { get { return scriptLinesPerSecond; } } |
125 | 125 | ||
126 | /// <summary> | 126 | // /// <summary> |
127 | /// This is the time it took for the last asset request made in response to a cache miss. | 127 | // /// This is the time it took for the last asset request made in response to a cache miss. |
128 | /// </summary> | 128 | // /// </summary> |
129 | public TimeSpan AssetRequestTimeAfterCacheMiss { get { return assetRequestTimeAfterCacheMiss; } } | 129 | // public TimeSpan AssetRequestTimeAfterCacheMiss { get { return assetRequestTimeAfterCacheMiss; } } |
130 | 130 | // | |
131 | /// <summary> | 131 | // /// <summary> |
132 | /// Number of persistent requests for missing textures we have started blocking from clients. To some extent | 132 | // /// Number of persistent requests for missing textures we have started blocking from clients. To some extent |
133 | /// this is just a temporary statistic to keep this problem in view - the root cause of this lies either | 133 | // /// this is just a temporary statistic to keep this problem in view - the root cause of this lies either |
134 | /// in a mishandling of the reply protocol, related to avatar appearance or may even originate in graphics | 134 | // /// in a mishandling of the reply protocol, related to avatar appearance or may even originate in graphics |
135 | /// driver bugs on clients (though this seems less likely). | 135 | // /// driver bugs on clients (though this seems less likely). |
136 | /// </summary> | 136 | // /// </summary> |
137 | public long BlockedMissingTextureRequests { get { return blockedMissingTextureRequests; } } | 137 | // public long BlockedMissingTextureRequests { get { return blockedMissingTextureRequests; } } |
138 | 138 | // | |
139 | /// <summary> | 139 | // /// <summary> |
140 | /// Record the number of times that an asset request has failed. Failures are effectively exceptions, such as | 140 | // /// Record the number of times that an asset request has failed. Failures are effectively exceptions, such as |
141 | /// request timeouts. If an asset service replies that a particular asset cannot be found, this is not counted | 141 | // /// request timeouts. If an asset service replies that a particular asset cannot be found, this is not counted |
142 | /// as a failure | 142 | // /// as a failure |
143 | /// </summary> | 143 | // /// </summary> |
144 | public long AssetServiceRequestFailures { get { return assetServiceRequestFailures; } } | 144 | // public long AssetServiceRequestFailures { get { return assetServiceRequestFailures; } } |
145 | 145 | ||
146 | /// <summary> | 146 | /// <summary> |
147 | /// Number of known failures to retrieve avatar inventory from the inventory service. This does not | 147 | /// Number of known failures to retrieve avatar inventory from the inventory service. This does not |
@@ -172,53 +172,53 @@ namespace OpenSim.Framework.Statistics | |||
172 | abnormalClientThreadTerminations++; | 172 | abnormalClientThreadTerminations++; |
173 | } | 173 | } |
174 | 174 | ||
175 | public void AddAsset(AssetBase asset) | 175 | // public void AddAsset(AssetBase asset) |
176 | { | 176 | // { |
177 | assetsInCache++; | 177 | // assetsInCache++; |
178 | //assetCacheMemoryUsage += asset.Data.Length; | 178 | // //assetCacheMemoryUsage += asset.Data.Length; |
179 | } | 179 | // } |
180 | 180 | // | |
181 | public void RemoveAsset(UUID uuid) | 181 | // public void RemoveAsset(UUID uuid) |
182 | { | 182 | // { |
183 | assetsInCache--; | 183 | // assetsInCache--; |
184 | } | 184 | // } |
185 | 185 | // | |
186 | public void AddTexture(AssetBase image) | 186 | // public void AddTexture(AssetBase image) |
187 | { | 187 | // { |
188 | if (image.Data != null) | 188 | // if (image.Data != null) |
189 | { | 189 | // { |
190 | texturesInCache++; | 190 | // texturesInCache++; |
191 | 191 | // | |
192 | // This could have been a pull stat, though there was originally a nebulous idea to measure flow rates | 192 | // // This could have been a pull stat, though there was originally a nebulous idea to measure flow rates |
193 | textureCacheMemoryUsage += image.Data.Length; | 193 | // textureCacheMemoryUsage += image.Data.Length; |
194 | } | 194 | // } |
195 | } | 195 | // } |
196 | 196 | // | |
197 | /// <summary> | 197 | // /// <summary> |
198 | /// Signal that the asset cache has been cleared. | 198 | // /// Signal that the asset cache has been cleared. |
199 | /// </summary> | 199 | // /// </summary> |
200 | public void ClearAssetCacheStatistics() | 200 | // public void ClearAssetCacheStatistics() |
201 | { | 201 | // { |
202 | assetsInCache = 0; | 202 | // assetsInCache = 0; |
203 | assetCacheMemoryUsage = 0; | 203 | // assetCacheMemoryUsage = 0; |
204 | texturesInCache = 0; | 204 | // texturesInCache = 0; |
205 | textureCacheMemoryUsage = 0; | 205 | // textureCacheMemoryUsage = 0; |
206 | } | 206 | // } |
207 | 207 | // | |
208 | public void AddAssetRequestTimeAfterCacheMiss(TimeSpan ts) | 208 | // public void AddAssetRequestTimeAfterCacheMiss(TimeSpan ts) |
209 | { | 209 | // { |
210 | assetRequestTimeAfterCacheMiss = ts; | 210 | // assetRequestTimeAfterCacheMiss = ts; |
211 | } | 211 | // } |
212 | 212 | // | |
213 | public void AddBlockedMissingTextureRequest() | 213 | // public void AddBlockedMissingTextureRequest() |
214 | { | 214 | // { |
215 | blockedMissingTextureRequests++; | 215 | // blockedMissingTextureRequests++; |
216 | } | 216 | // } |
217 | 217 | // | |
218 | public void AddAssetServiceRequestFailure() | 218 | // public void AddAssetServiceRequestFailure() |
219 | { | 219 | // { |
220 | assetServiceRequestFailures++; | 220 | // assetServiceRequestFailures++; |
221 | } | 221 | // } |
222 | 222 | ||
223 | // public void AddInventoryServiceRetrievalFailure() | 223 | // public void AddInventoryServiceRetrievalFailure() |
224 | // { | 224 | // { |
@@ -291,8 +291,8 @@ namespace OpenSim.Framework.Statistics | |||
291 | public override string Report() | 291 | public override string Report() |
292 | { | 292 | { |
293 | StringBuilder sb = new StringBuilder(Environment.NewLine); | 293 | StringBuilder sb = new StringBuilder(Environment.NewLine); |
294 | sb.Append("ASSET STATISTICS"); | 294 | // sb.Append("ASSET STATISTICS"); |
295 | sb.Append(Environment.NewLine); | 295 | // sb.Append(Environment.NewLine); |
296 | 296 | ||
297 | /* | 297 | /* |
298 | sb.Append( | 298 | sb.Append( |
@@ -308,7 +308,8 @@ Asset service request failures: {6}"+ Environment.NewLine, | |||
308 | BlockedMissingTextureRequests, | 308 | BlockedMissingTextureRequests, |
309 | AssetServiceRequestFailures)); | 309 | AssetServiceRequestFailures)); |
310 | */ | 310 | */ |
311 | 311 | ||
312 | /* | ||
312 | sb.Append( | 313 | sb.Append( |
313 | string.Format( | 314 | string.Format( |
314 | @"Asset cache contains {0,6} assets | 315 | @"Asset cache contains {0,6} assets |
@@ -319,7 +320,7 @@ Asset service request failures: {3}" + Environment.NewLine, | |||
319 | assetRequestTimeAfterCacheMiss.Milliseconds / 1000.0, | 320 | assetRequestTimeAfterCacheMiss.Milliseconds / 1000.0, |
320 | BlockedMissingTextureRequests, | 321 | BlockedMissingTextureRequests, |
321 | AssetServiceRequestFailures)); | 322 | AssetServiceRequestFailures)); |
322 | 323 | */ | |
323 | 324 | ||
324 | sb.Append(Environment.NewLine); | 325 | sb.Append(Environment.NewLine); |
325 | sb.Append("CONNECTION STATISTICS"); | 326 | sb.Append("CONNECTION STATISTICS"); |
@@ -391,15 +392,15 @@ Asset service request failures: {3}" + Environment.NewLine, | |||
391 | public override string XReport(string uptime, string version) | 392 | public override string XReport(string uptime, string version) |
392 | { | 393 | { |
393 | OSDMap args = new OSDMap(30); | 394 | OSDMap args = new OSDMap(30); |
394 | args["AssetsInCache"] = OSD.FromString (String.Format ("{0:0.##}", AssetsInCache)); | 395 | // args["AssetsInCache"] = OSD.FromString (String.Format ("{0:0.##}", AssetsInCache)); |
395 | args["TimeAfterCacheMiss"] = OSD.FromString (String.Format ("{0:0.##}", | 396 | // args["TimeAfterCacheMiss"] = OSD.FromString (String.Format ("{0:0.##}", |
396 | assetRequestTimeAfterCacheMiss.Milliseconds / 1000.0)); | 397 | // assetRequestTimeAfterCacheMiss.Milliseconds / 1000.0)); |
397 | args["BlockedMissingTextureRequests"] = OSD.FromString (String.Format ("{0:0.##}", | 398 | // args["BlockedMissingTextureRequests"] = OSD.FromString (String.Format ("{0:0.##}", |
398 | BlockedMissingTextureRequests)); | 399 | // BlockedMissingTextureRequests)); |
399 | args["AssetServiceRequestFailures"] = OSD.FromString (String.Format ("{0:0.##}", | 400 | // args["AssetServiceRequestFailures"] = OSD.FromString (String.Format ("{0:0.##}", |
400 | AssetServiceRequestFailures)); | 401 | // AssetServiceRequestFailures)); |
401 | args["abnormalClientThreadTerminations"] = OSD.FromString (String.Format ("{0:0.##}", | 402 | // args["abnormalClientThreadTerminations"] = OSD.FromString (String.Format ("{0:0.##}", |
402 | abnormalClientThreadTerminations)); | 403 | // abnormalClientThreadTerminations)); |
403 | // args["InventoryServiceRetrievalFailures"] = OSD.FromString (String.Format ("{0:0.##}", | 404 | // args["InventoryServiceRetrievalFailures"] = OSD.FromString (String.Format ("{0:0.##}", |
404 | // InventoryServiceRetrievalFailures)); | 405 | // InventoryServiceRetrievalFailures)); |
405 | args["Dilatn"] = OSD.FromString (String.Format ("{0:0.##}", timeDilation)); | 406 | args["Dilatn"] = OSD.FromString (String.Format ("{0:0.##}", timeDilation)); |