* minor: Properly clear the pushed asset cache statistics where the clear-assets command is used on the region console
* stop waiting for garbage collection when GC total memory used is requested, in case the periodic request of this lags the sim0.6.0-stable
parent
686f16cedd
commit
3794f25ebd
|
@ -143,6 +143,10 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
public void Clear()
|
||||
{
|
||||
m_log.Info("[ASSET CACHE]: Clearing Asset cache");
|
||||
|
||||
if (StatsManager.SimExtraStats != null)
|
||||
StatsManager.SimExtraStats.ClearAssetCacheStatistics();
|
||||
|
||||
Initialize();
|
||||
}
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ namespace OpenSim.Framework.Statistics
|
|||
sb.Append(
|
||||
string.Format(
|
||||
"Allocated to OpenSim : {0} MB" + Environment.NewLine,
|
||||
Math.Round(GC.GetTotalMemory(true) / 1024.0 / 1024.0)));
|
||||
Math.Round(GC.GetTotalMemory(false) / 1024.0 / 1024.0)));
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
|
|
@ -53,6 +53,11 @@ namespace OpenSim.Framework.Statistics
|
|||
/// </summary>
|
||||
public long AbnormalClientThreadTerminations { get { return abnormalClientThreadTerminations; } }
|
||||
|
||||
/// <summary>
|
||||
/// 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... :)
|
||||
/// </summary>
|
||||
public long AssetsInCache { get { return assetsInCache; } }
|
||||
public long TexturesInCache { get { return texturesInCache; } }
|
||||
public long AssetCacheMemoryUsage { get { return assetCacheMemoryUsage; } }
|
||||
|
@ -100,6 +105,17 @@ namespace OpenSim.Framework.Statistics
|
|||
textureCacheMemoryUsage += image.Data.Length;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Signal that the asset cache can be cleared.
|
||||
/// </summary>
|
||||
public void ClearAssetCacheStatistics()
|
||||
{
|
||||
assetsInCache = 0;
|
||||
assetCacheMemoryUsage = 0;
|
||||
texturesInCache = 0;
|
||||
textureCacheMemoryUsage = 0;
|
||||
}
|
||||
|
||||
public void AddBlockedMissingTextureRequest()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue