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.cs35
1 files changed, 29 insertions, 6 deletions
diff --git a/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs b/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs
index 3716f9b..fd021bc 100644
--- a/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs
+++ b/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs
@@ -42,6 +42,7 @@ namespace OpenSim.Framework.Statistics
42 private long texturesInCache; 42 private long texturesInCache;
43 private long assetCacheMemoryUsage; 43 private long assetCacheMemoryUsage;
44 private long textureCacheMemoryUsage; 44 private long textureCacheMemoryUsage;
45 private long blockedMissingTextureRequests;
45 46
46 private long inventoryServiceRetrievalFailures; 47 private long inventoryServiceRetrievalFailures;
47 48
@@ -49,6 +50,14 @@ namespace OpenSim.Framework.Statistics
49 public long TexturesInCache { get { return texturesInCache; } } 50 public long TexturesInCache { get { return texturesInCache; } }
50 public long AssetCacheMemoryUsage { get { return assetCacheMemoryUsage; } } 51 public long AssetCacheMemoryUsage { get { return assetCacheMemoryUsage; } }
51 public long TextureCacheMemoryUsage { get { return textureCacheMemoryUsage; } } 52 public long TextureCacheMemoryUsage { get { return textureCacheMemoryUsage; } }
53
54 /// <summary>
55 /// Number of persistent requests for missing textures we have started blocking from clients. To some extent
56 /// this is just a temporary statistic to keep this problem in view - the root cause of this lies either
57 /// in a mishandling of the reply protocol, related to avatar appearance or may even originate in graphics
58 /// driver bugs on clients (though this seems less likely).
59 /// </summary>
60 public long BlockedMissingTextureRequests { get { return blockedMissingTextureRequests; } }
52 61
53 /// <summary> 62 /// <summary>
54 /// Number of known failures to retrieve avatar inventory from the inventory service. This does not 63 /// Number of known failures to retrieve avatar inventory from the inventory service. This does not
@@ -71,14 +80,20 @@ namespace OpenSim.Framework.Statistics
71 80
72 public void AddTexture(AssetBase image) 81 public void AddTexture(AssetBase image)
73 { 82 {
74 // Tedd: I added null check to avoid exception. Don't know if texturesInCache should ++ anyway?
75 if (image.Data != null) 83 if (image.Data != null)
76 { 84 {
77 texturesInCache++; 85 texturesInCache++;
86
87 // This could have been a pull stat, though there was originally a nebulous idea to measure flow rates
78 textureCacheMemoryUsage += image.Data.Length; 88 textureCacheMemoryUsage += image.Data.Length;
79 } 89 }
80 } 90 }
81 91
92 public void AddBlockedMissingTextureRequest()
93 {
94 blockedMissingTextureRequests++;
95 }
96
82 public void AddInventoryServiceRetrievalFailure() 97 public void AddInventoryServiceRetrievalFailure()
83 { 98 {
84 inventoryServiceRetrievalFailures++; 99 inventoryServiceRetrievalFailures++;
@@ -116,14 +131,22 @@ namespace OpenSim.Framework.Statistics
116 public string Report() 131 public string Report()
117 { 132 {
118 StringBuilder sb = new StringBuilder(Environment.NewLine); 133 StringBuilder sb = new StringBuilder(Environment.NewLine);
119 sb.Append("ASSET CACHE STATISTICS"); 134 sb.Append("ASSET STATISTICS");
135 sb.Append(Environment.NewLine);
136 sb.Append(
137 string.Format(
138@"Asset cache contains {0,6} assets using {1,10:0.000}K" + Environment.NewLine,
139 AssetsInCache, AssetCacheMemoryUsage / 1024.0));
140
141 sb.Append(Environment.NewLine);
142 sb.Append("TEXTURE STATISTICS");
120 sb.Append(Environment.NewLine); 143 sb.Append(Environment.NewLine);
121 sb.Append( 144 sb.Append(
122 string.Format( 145 string.Format(
123@"Asset cache contains {0,6} assets using {1,10:0.000}K 146@"Texture cache contains {0,6} textures using {1,10:0.000}K
124Texture cache contains {2,6} textures using {3,10:0.000}K" + Environment.NewLine, 147Blocked requests for missing textures: {2}" + Environment.NewLine,
125 AssetsInCache, AssetCacheMemoryUsage / 1024.0, 148 TexturesInCache, TextureCacheMemoryUsage / 1024.0,
126 TexturesInCache, TextureCacheMemoryUsage / 1024.0)); 149 BlockedMissingTextureRequests));
127 150
128 sb.Append(Environment.NewLine); 151 sb.Append(Environment.NewLine);
129 sb.Append("INVENTORY STATISTICS"); 152 sb.Append("INVENTORY STATISTICS");