From 8fb3523ef74f87995a4c791212e7dbefe8134a61 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Sun, 21 Sep 2008 20:29:06 +0000
Subject: * Start recording asset request times after a cache miss. This is
very primtive at the moment - only the last time is kept for some classes of
request * This can be seen as "Latest asset request time after cache miss" in
show stats on the region console
---
.../Framework/Statistics/SimExtraStatsCollector.cs | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Framework/Statistics')
diff --git a/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs b/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs
index cc64ed6..2f6bb7e 100644
--- a/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs
+++ b/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs
@@ -45,6 +45,7 @@ namespace OpenSim.Framework.Statistics
private long texturesInCache;
private long assetCacheMemoryUsage;
private long textureCacheMemoryUsage;
+ private TimeSpan assetRequestTimeAfterCacheMiss;
private long blockedMissingTextureRequests;
private long assetServiceRequestFailures;
@@ -86,6 +87,11 @@ namespace OpenSim.Framework.Statistics
public long TexturesInCache { get { return texturesInCache; } }
public long AssetCacheMemoryUsage { get { return assetCacheMemoryUsage; } }
public long TextureCacheMemoryUsage { get { return textureCacheMemoryUsage; } }
+
+ ///
+ /// This is the time it took for the last asset request made in response to a cache miss.
+ ///
+ public TimeSpan AssetRequestTimeAfterCacheMiss { get { return assetRequestTimeAfterCacheMiss; } }
///
/// Number of persistent requests for missing textures we have started blocking from clients. To some extent
@@ -148,7 +154,7 @@ namespace OpenSim.Framework.Statistics
}
///
- /// Signal that the asset cache can be cleared.
+ /// Signal that the asset cache has been cleared.
///
public void ClearAssetCacheStatistics()
{
@@ -157,6 +163,11 @@ namespace OpenSim.Framework.Statistics
texturesInCache = 0;
textureCacheMemoryUsage = 0;
}
+
+ public void AddAssetRequestTimeAfterCacheMiss(TimeSpan ts)
+ {
+ assetRequestTimeAfterCacheMiss = ts;
+ }
public void AddBlockedMissingTextureRequest()
{
@@ -245,10 +256,12 @@ namespace OpenSim.Framework.Statistics
string.Format(
@"Asset cache contains {0,6} non-texture assets using {1,10} K
Texture cache contains {2,6} texture assets using {3,10} K
-Blocked client requests for missing textures: {4}
-Asset service request failures: {5}"+ Environment.NewLine,
+Latest asset request time after cache miss: {4}s
+Blocked client requests for missing textures: {5}
+Asset service request failures: {6}"+ Environment.NewLine,
AssetsInCache, Math.Round(AssetCacheMemoryUsage / 1024.0),
TexturesInCache, Math.Round(TextureCacheMemoryUsage / 1024.0),
+ assetRequestTimeAfterCacheMiss.Milliseconds / 1000.0,
BlockedMissingTextureRequests,
AssetServiceRequestFailures));
--
cgit v1.1