* 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 libsecondlife;
|
||||||
using log4net;
|
using log4net;
|
||||||
using OpenSim.Framework.AssetLoader.Filesystem;
|
using OpenSim.Framework.AssetLoader.Filesystem;
|
||||||
|
using OpenSim.Framework.Statistics;
|
||||||
|
|
||||||
namespace OpenSim.Framework.Communications.Cache
|
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);
|
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);
|
m_receiver.AssetNotFound(req.AssetID, req.IsTexture);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -87,13 +91,13 @@ namespace OpenSim.Framework.Communications.Cache
|
||||||
|
|
||||||
if (asset != null)
|
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);
|
m_receiver.AssetReceived(asset, req.IsTexture);
|
||||||
}
|
}
|
||||||
else
|
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);
|
m_receiver.AssetNotFound(req.AssetID, req.IsTexture);
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,6 +46,7 @@ namespace OpenSim.Framework.Statistics
|
||||||
private long textureCacheMemoryUsage;
|
private long textureCacheMemoryUsage;
|
||||||
private long blockedMissingTextureRequests;
|
private long blockedMissingTextureRequests;
|
||||||
|
|
||||||
|
private long assetServiceRequestFailures;
|
||||||
private long inventoryServiceRetrievalFailures;
|
private long inventoryServiceRetrievalFailures;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -71,6 +72,13 @@ namespace OpenSim.Framework.Statistics
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public long BlockedMissingTextureRequests { get { return blockedMissingTextureRequests; } }
|
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>
|
/// <summary>
|
||||||
/// Number of known failures to retrieve avatar inventory from the inventory service. This does not
|
/// 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
|
/// cover situations where the inventory service accepts the request but never returns any data, since
|
||||||
|
@ -122,6 +130,11 @@ namespace OpenSim.Framework.Statistics
|
||||||
blockedMissingTextureRequests++;
|
blockedMissingTextureRequests++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void AddAssetServiceRequestFailure()
|
||||||
|
{
|
||||||
|
assetServiceRequestFailures++;
|
||||||
|
}
|
||||||
|
|
||||||
public void AddInventoryServiceRetrievalFailure()
|
public void AddInventoryServiceRetrievalFailure()
|
||||||
{
|
{
|
||||||
inventoryServiceRetrievalFailures++;
|
inventoryServiceRetrievalFailures++;
|
||||||
|
@ -163,18 +176,14 @@ namespace OpenSim.Framework.Statistics
|
||||||
sb.Append(Environment.NewLine);
|
sb.Append(Environment.NewLine);
|
||||||
sb.Append(
|
sb.Append(
|
||||||
string.Format(
|
string.Format(
|
||||||
@"Asset cache contains {0,6} assets using {1,10} K" + Environment.NewLine,
|
@"Asset cache contains {0,6} non-texture assets using {1,10} K
|
||||||
AssetsInCache, Math.Round(AssetCacheMemoryUsage / 1024.0)));
|
Texture cache contains {2,6} texture assets using {3,10} K
|
||||||
|
Blocked client requests for missing textures: {4}
|
||||||
sb.Append(Environment.NewLine);
|
Asset service request failures: {5}"+ Environment.NewLine,
|
||||||
sb.Append("TEXTURE STATISTICS");
|
AssetsInCache, Math.Round(AssetCacheMemoryUsage / 1024.0),
|
||||||
sb.Append(Environment.NewLine);
|
TexturesInCache, Math.Round(TextureCacheMemoryUsage / 1024.0),
|
||||||
sb.Append(
|
BlockedMissingTextureRequests,
|
||||||
string.Format(
|
AssetServiceRequestFailures));
|
||||||
@"Texture cache contains {0,6} textures using {1,10} K
|
|
||||||
Blocked requests for missing textures: {2}" + Environment.NewLine,
|
|
||||||
TexturesInCache, Math.Round(TextureCacheMemoryUsage / 1024.0),
|
|
||||||
BlockedMissingTextureRequests));
|
|
||||||
|
|
||||||
sb.Append(Environment.NewLine);
|
sb.Append(Environment.NewLine);
|
||||||
sb.Append("CONNECTION STATISTICS");
|
sb.Append("CONNECTION STATISTICS");
|
||||||
|
|
Loading…
Reference in New Issue