diff options
-rw-r--r-- | OpenSim/Framework/Communications/Cache/AssetCache.cs | 4 | ||||
-rw-r--r-- | OpenSim/Framework/Statistics/BaseStatsCollector.cs | 2 | ||||
-rw-r--r-- | OpenSim/Framework/Statistics/SimExtraStatsCollector.cs | 16 |
3 files changed, 21 insertions, 1 deletions
diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs index dcb7d73..dd9015b 100644 --- a/OpenSim/Framework/Communications/Cache/AssetCache.cs +++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs | |||
@@ -143,6 +143,10 @@ namespace OpenSim.Framework.Communications.Cache | |||
143 | public void Clear() | 143 | public void Clear() |
144 | { | 144 | { |
145 | m_log.Info("[ASSET CACHE]: Clearing Asset cache"); | 145 | m_log.Info("[ASSET CACHE]: Clearing Asset cache"); |
146 | |||
147 | if (StatsManager.SimExtraStats != null) | ||
148 | StatsManager.SimExtraStats.ClearAssetCacheStatistics(); | ||
149 | |||
146 | Initialize(); | 150 | Initialize(); |
147 | } | 151 | } |
148 | 152 | ||
diff --git a/OpenSim/Framework/Statistics/BaseStatsCollector.cs b/OpenSim/Framework/Statistics/BaseStatsCollector.cs index 225c551..c888f4c 100644 --- a/OpenSim/Framework/Statistics/BaseStatsCollector.cs +++ b/OpenSim/Framework/Statistics/BaseStatsCollector.cs | |||
@@ -43,7 +43,7 @@ namespace OpenSim.Framework.Statistics | |||
43 | sb.Append( | 43 | sb.Append( |
44 | string.Format( | 44 | string.Format( |
45 | "Allocated to OpenSim : {0} MB" + Environment.NewLine, | 45 | "Allocated to OpenSim : {0} MB" + Environment.NewLine, |
46 | Math.Round(GC.GetTotalMemory(true) / 1024.0 / 1024.0))); | 46 | Math.Round(GC.GetTotalMemory(false) / 1024.0 / 1024.0))); |
47 | 47 | ||
48 | return sb.ToString(); | 48 | return sb.ToString(); |
49 | } | 49 | } |
diff --git a/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs b/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs index 7a74e72..0a20f33 100644 --- a/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs +++ b/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs | |||
@@ -53,6 +53,11 @@ namespace OpenSim.Framework.Statistics | |||
53 | /// </summary> | 53 | /// </summary> |
54 | public long AbnormalClientThreadTerminations { get { return abnormalClientThreadTerminations; } } | 54 | public long AbnormalClientThreadTerminations { get { return abnormalClientThreadTerminations; } } |
55 | 55 | ||
56 | /// <summary> | ||
57 | /// These statistics are being collected by push rather than pull. Pull would be simpler, but I had the | ||
58 | /// notion of providing some flow statistics (which pull wouldn't give us). Though admittedly these | ||
59 | /// haven't yet been implemented... :) | ||
60 | /// </summary> | ||
56 | public long AssetsInCache { get { return assetsInCache; } } | 61 | public long AssetsInCache { get { return assetsInCache; } } |
57 | public long TexturesInCache { get { return texturesInCache; } } | 62 | public long TexturesInCache { get { return texturesInCache; } } |
58 | public long AssetCacheMemoryUsage { get { return assetCacheMemoryUsage; } } | 63 | public long AssetCacheMemoryUsage { get { return assetCacheMemoryUsage; } } |
@@ -100,6 +105,17 @@ namespace OpenSim.Framework.Statistics | |||
100 | textureCacheMemoryUsage += image.Data.Length; | 105 | textureCacheMemoryUsage += image.Data.Length; |
101 | } | 106 | } |
102 | } | 107 | } |
108 | |||
109 | /// <summary> | ||
110 | /// Signal that the asset cache can be cleared. | ||
111 | /// </summary> | ||
112 | public void ClearAssetCacheStatistics() | ||
113 | { | ||
114 | assetsInCache = 0; | ||
115 | assetCacheMemoryUsage = 0; | ||
116 | texturesInCache = 0; | ||
117 | textureCacheMemoryUsage = 0; | ||
118 | } | ||
103 | 119 | ||
104 | public void AddBlockedMissingTextureRequest() | 120 | public void AddBlockedMissingTextureRequest() |
105 | { | 121 | { |