From 6573e2ee2f2a5df57e40a1fa83688477e9d15ff3 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Fri, 13 Mar 2009 18:36:24 +0000 Subject: * Remove asset cache size and texture stat reports from ASSET STATS since these are now inaccurate * Correct count of assets in cache --- .../Framework/Statistics/SimExtraStatsCollector.cs | 37 ++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) (limited to 'OpenSim/Framework/Statistics/SimExtraStatsCollector.cs') diff --git a/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs b/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs index ce654eb..d6e26e4 100644 --- a/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs +++ b/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs @@ -80,11 +80,23 @@ namespace OpenSim.Framework.Statistics /// /// These statistics are being collected by push rather than pull. Pull would be simpler, but I had the /// notion of providing some flow statistics (which pull wouldn't give us). Though admittedly these - /// haven't yet been implemented... :) + /// haven't yet been implemented... /// public long AssetsInCache { get { return assetsInCache; } } + + /// + /// Currently unused + /// public long TexturesInCache { get { return texturesInCache; } } + + /// + /// Currently misleading since we can't currently subtract removed asset memory usage without a performance hit + /// public long AssetCacheMemoryUsage { get { return assetCacheMemoryUsage; } } + + /// + /// Currently unused + /// public long TextureCacheMemoryUsage { get { return textureCacheMemoryUsage; } } public float TimeDilation { get { return timeDilation; } } @@ -108,6 +120,7 @@ namespace OpenSim.Framework.Statistics public float PendingUploads { get { return pendingUploads; } } public float ActiveScripts { get { return activeScripts; } } public float ScriptLinesPerSecond { get { return scriptLinesPerSecond; } } + /// /// This is the time it took for the last asset request made in response to a cache miss. /// @@ -159,7 +172,12 @@ namespace OpenSim.Framework.Statistics public void AddAsset(AssetBase asset) { assetsInCache++; - assetCacheMemoryUsage += asset.Data.Length; + //assetCacheMemoryUsage += asset.Data.Length; + } + + public void RemoveAsset(UUID uuid) + { + assetsInCache--; } public void AddTexture(AssetBase image) @@ -272,6 +290,8 @@ namespace OpenSim.Framework.Statistics StringBuilder sb = new StringBuilder(Environment.NewLine); sb.Append("ASSET STATISTICS"); sb.Append(Environment.NewLine); + + /* sb.Append( string.Format( @"Asset cache contains {0,6} non-texture assets using {1,10} K @@ -284,6 +304,19 @@ Asset service request failures: {6}"+ Environment.NewLine, assetRequestTimeAfterCacheMiss.Milliseconds / 1000.0, BlockedMissingTextureRequests, AssetServiceRequestFailures)); + */ + + sb.Append( + string.Format( +@"Asset cache contains {0,6} assets +Latest asset request time after cache miss: {1}s +Blocked client requests for missing textures: {2} +Asset service request failures: {3}" + Environment.NewLine, + AssetsInCache, + assetRequestTimeAfterCacheMiss.Milliseconds / 1000.0, + BlockedMissingTextureRequests, + AssetServiceRequestFailures)); + sb.Append(Environment.NewLine); sb.Append("CONNECTION STATISTICS"); -- cgit v1.1