* Start recording asset request failures
* This includes problems such as connection failures and timeouts. It does not include 'asset not found' replies from the asset service.0.6.0-stable
parent
6bea792436
commit
4af6286512
|
@ -31,6 +31,7 @@ using System.Threading;
|
|||
using libsecondlife;
|
||||
using log4net;
|
||||
using OpenSim.Framework.AssetLoader.Filesystem;
|
||||
using OpenSim.Framework.Statistics;
|
||||
|
||||
namespace OpenSim.Framework.Communications.Cache
|
||||
{
|
||||
|
@ -80,6 +81,9 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
{
|
||||
m_log.ErrorFormat("[ASSET]: Asset request for {0} threw exception {1}", req.AssetID, e);
|
||||
|
||||
if (StatsManager.SimExtraStats != null)
|
||||
StatsManager.SimExtraStats.AddAssetServiceRequestFailure();
|
||||
|
||||
m_receiver.AssetNotFound(req.AssetID, req.IsTexture);
|
||||
|
||||
return;
|
||||
|
@ -87,13 +91,13 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
|
||||
if (asset != null)
|
||||
{
|
||||
m_log.DebugFormat("[ASSET]: Asset {0} received from asset server", req.AssetID);
|
||||
//m_log.DebugFormat("[ASSET]: Asset {0} received from asset server", req.AssetID);
|
||||
|
||||
m_receiver.AssetReceived(asset, req.IsTexture);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.WarnFormat("[ASSET]: Asset {0} not found by asset server", req.AssetID);
|
||||
//m_log.WarnFormat("[ASSET]: Asset {0} not found by asset server", req.AssetID);
|
||||
|
||||
m_receiver.AssetNotFound(req.AssetID, req.IsTexture);
|
||||
}
|
||||
|
|
|
@ -46,6 +46,7 @@ namespace OpenSim.Framework.Statistics
|
|||
private long textureCacheMemoryUsage;
|
||||
private long blockedMissingTextureRequests;
|
||||
|
||||
private long assetServiceRequestFailures;
|
||||
private long inventoryServiceRetrievalFailures;
|
||||
|
||||
/// <summary>
|
||||
|
@ -71,6 +72,13 @@ namespace OpenSim.Framework.Statistics
|
|||
/// </summary>
|
||||
public long BlockedMissingTextureRequests { get { return blockedMissingTextureRequests; } }
|
||||
|
||||
/// <summary>
|
||||
/// Record the number of times that an asset request has failed. Failures are effectively exceptions, such as
|
||||
/// request timeouts. If an asset service replies that a particular asset cannot be found, this is not counted
|
||||
/// as a failure
|
||||
/// </summary>
|
||||
public long AssetServiceRequestFailures { get { return assetServiceRequestFailures; } }
|
||||
|
||||
/// <summary>
|
||||
/// Number of known failures to retrieve avatar inventory from the inventory service. This does not
|
||||
/// cover situations where the inventory service accepts the request but never returns any data, since
|
||||
|
@ -122,6 +130,11 @@ namespace OpenSim.Framework.Statistics
|
|||
blockedMissingTextureRequests++;
|
||||
}
|
||||
|
||||
public void AddAssetServiceRequestFailure()
|
||||
{
|
||||
assetServiceRequestFailures++;
|
||||
}
|
||||
|
||||
public void AddInventoryServiceRetrievalFailure()
|
||||
{
|
||||
inventoryServiceRetrievalFailures++;
|
||||
|
@ -163,18 +176,14 @@ namespace OpenSim.Framework.Statistics
|
|||
sb.Append(Environment.NewLine);
|
||||
sb.Append(
|
||||
string.Format(
|
||||
@"Asset cache contains {0,6} assets using {1,10} K" + Environment.NewLine,
|
||||
AssetsInCache, Math.Round(AssetCacheMemoryUsage / 1024.0)));
|
||||
|
||||
sb.Append(Environment.NewLine);
|
||||
sb.Append("TEXTURE STATISTICS");
|
||||
sb.Append(Environment.NewLine);
|
||||
sb.Append(
|
||||
string.Format(
|
||||
@"Texture cache contains {0,6} textures using {1,10} K
|
||||
Blocked requests for missing textures: {2}" + Environment.NewLine,
|
||||
@"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,
|
||||
AssetsInCache, Math.Round(AssetCacheMemoryUsage / 1024.0),
|
||||
TexturesInCache, Math.Round(TextureCacheMemoryUsage / 1024.0),
|
||||
BlockedMissingTextureRequests));
|
||||
BlockedMissingTextureRequests,
|
||||
AssetServiceRequestFailures));
|
||||
|
||||
sb.Append(Environment.NewLine);
|
||||
sb.Append("CONNECTION STATISTICS");
|
||||
|
|
Loading…
Reference in New Issue