aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Framework/Statistics/SimExtraStatsCollector.cs35
-rw-r--r--OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs6
-rw-r--r--prebuild.xml14
3 files changed, 42 insertions, 13 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");
diff --git a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs
index 12ee278..d4fa39f 100644
--- a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs
@@ -31,6 +31,7 @@ using libsecondlife;
31using log4net; 31using log4net;
32using OpenSim.Framework; 32using OpenSim.Framework;
33using OpenSim.Framework.Communications.Limit; 33using OpenSim.Framework.Communications.Limit;
34using OpenSim.Framework.Statistics;
34using OpenSim.Region.Environment.Interfaces; 35using OpenSim.Region.Environment.Interfaces;
35using OpenSim.Region.Environment.Scenes; 36using OpenSim.Region.Environment.Scenes;
36 37
@@ -125,10 +126,11 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
125 { 126 {
126 if (missingTextureLimitStrategy.IsFirstRefusal(e.RequestedAssetID)) 127 if (missingTextureLimitStrategy.IsFirstRefusal(e.RequestedAssetID))
127 { 128 {
129 if (StatsManager.SimExtraStats != null)
130 StatsManager.SimExtraStats.AddBlockedMissingTextureRequest();
131
128 // Commenting out this message for now as it causes too much noise with other 132 // Commenting out this message for now as it causes too much noise with other
129 // debug messages. 133 // debug messages.
130 // TODO: possibly record this as a statistic in the future
131 //
132// m_log.DebugFormat( 134// m_log.DebugFormat(
133// "[USER TEXTURE DOWNLOAD SERVICE]: Dropping requests for notified missing texture {0} for client {1} since we have received more than {2} requests", 135// "[USER TEXTURE DOWNLOAD SERVICE]: Dropping requests for notified missing texture {0} for client {1} since we have received more than {2} requests",
134// e.RequestedAssetID, m_client.AgentId, MAX_ALLOWED_TEXTURE_REQUESTS); 136// e.RequestedAssetID, m_client.AgentId, MAX_ALLOWED_TEXTURE_REQUESTS);
diff --git a/prebuild.xml b/prebuild.xml
index a00c547..2b1e35b 100644
--- a/prebuild.xml
+++ b/prebuild.xml
@@ -752,17 +752,20 @@
752 <Reference name="System" localCopy="false"/> 752 <Reference name="System" localCopy="false"/>
753 <Reference name="System.Xml"/> 753 <Reference name="System.Xml"/>
754 <Reference name="System.Drawing"/> 754 <Reference name="System.Drawing"/>
755 <Reference name="System.Runtime.Remoting"/> 755 <Reference name="System.Runtime.Remoting"/>
756 <Reference name="libsecondlife.dll"/> 756 <Reference name="libsecondlife.dll"/>
757 <Reference name="Axiom.MathLib.dll"/> 757 <Reference name="Axiom.MathLib.dll"/>
758 <Reference name="OpenSim.Framework"/> 758 <Reference name="OpenSim.Framework"/>
759 <Reference name="OpenSim.Data" /> 759 <Reference name="OpenSim.Data" />
760 <Reference name="OpenSim.Framework.Console"/> 760 <Reference name="OpenSim.Framework.Console"/>
761 <Reference name="OpenSim.Region.Physics.Manager"/>
762 <Reference name="OpenSim.Framework.Servers"/> 761 <Reference name="OpenSim.Framework.Servers"/>
763 <!-- Unit tests --> 762 <Reference name="OpenSim.Framework.Statistics"/>
764 <Reference name="OpenSim.Tests.Common"/> 763 <Reference name="OpenSim.Region.Physics.Manager"/>
765 <Reference name="nunit.framework.dll"/> 764
765 <!-- Unit tests -->
766 <Reference name="OpenSim.Tests.Common"/>
767 <Reference name="nunit.framework.dll"/>
768
766 <!-- For scripting in funny languages by default --> 769 <!-- For scripting in funny languages by default -->
767 <Reference name="Microsoft.JScript"/> 770 <Reference name="Microsoft.JScript"/>
768 <Reference name="XMLRPC.dll"/> 771 <Reference name="XMLRPC.dll"/>
@@ -770,6 +773,7 @@
770 <Reference name="OpenSim.Data.Base"/> 773 <Reference name="OpenSim.Data.Base"/>
771 <Reference name="Nini.dll" /> 774 <Reference name="Nini.dll" />
772 <Reference name="log4net"/> 775 <Reference name="log4net"/>
776
773 <Files> 777 <Files>
774 <Match pattern="*.cs" recurse="true"/> 778 <Match pattern="*.cs" recurse="true"/>
775 </Files> 779 </Files>