* Refactor: Renaming non viewer statistics classes from Reporters to Collectors - this seems more intuitive
parent
e45ace9b54
commit
56faeafdae
|
@ -31,9 +31,9 @@ using System.Timers;
|
|||
namespace OpenSim.Framework.Statistics
|
||||
{
|
||||
/// <summary>
|
||||
/// Collects and reports information on the requests made to the asset server
|
||||
/// Asset service statistics collection
|
||||
/// </summary>
|
||||
public class AssetStatsReporter
|
||||
public class AssetStatsCollector
|
||||
{
|
||||
private Timer ageStatsTimer = new Timer(24 * 60 * 60 * 1000);
|
||||
private DateTime startTime = DateTime.Now;
|
||||
|
@ -48,7 +48,7 @@ namespace OpenSim.Framework.Statistics
|
|||
public long AssetRequestsYesterday { get { return assetRequestsYesterday; } }
|
||||
public long AssetRequestsNotFoundYesterday { get { return assetRequestsNotFoundYesterday; } }
|
||||
|
||||
public AssetStatsReporter()
|
||||
public AssetStatsCollector()
|
||||
{
|
||||
ageStatsTimer.Elapsed += new ElapsedEventHandler(OnAgeing);
|
||||
ageStatsTimer.Enabled = true;
|
|
@ -28,7 +28,7 @@
|
|||
namespace OpenSim.Framework.Statistics.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// Description of IPullStatsProvider.
|
||||
/// Implemented by objects which allow statistical information to be pulled from them.
|
||||
/// </summary>
|
||||
public interface IPullStatsProvider
|
||||
{
|
||||
|
|
|
@ -33,7 +33,10 @@ using OpenSim.Framework.Statistics.Interfaces;
|
|||
|
||||
namespace OpenSim.Framework.Statistics
|
||||
{
|
||||
public class SimExtraStatsReporter
|
||||
/// <summary>
|
||||
/// Collects sim statistics which aren't already being collected for the linden viewer's statistics pane
|
||||
/// </summary>
|
||||
public class SimExtraStatsCollector
|
||||
{
|
||||
private long assetsInCache;
|
||||
private long texturesInCache;
|
||||
|
@ -48,8 +51,8 @@ namespace OpenSim.Framework.Statistics
|
|||
/// <summary>
|
||||
/// Retain a dictionary of all packet queues stats reporters
|
||||
/// </summary>
|
||||
private IDictionary<LLUUID, PacketQueueStatsReporter> packetQueueStatsReporters
|
||||
= new Dictionary<LLUUID, PacketQueueStatsReporter>();
|
||||
private IDictionary<LLUUID, PacketQueueStatsCollector> packetQueueStatsCollectors
|
||||
= new Dictionary<LLUUID, PacketQueueStatsCollector>();
|
||||
|
||||
public void AddAsset(AssetBase asset)
|
||||
{
|
||||
|
@ -74,9 +77,9 @@ namespace OpenSim.Framework.Statistics
|
|||
/// <param name="provider"></param>
|
||||
public void RegisterPacketQueueStatsProvider(LLUUID uuid, IPullStatsProvider provider)
|
||||
{
|
||||
lock (packetQueueStatsReporters)
|
||||
lock (packetQueueStatsCollectors)
|
||||
{
|
||||
packetQueueStatsReporters[uuid] = new PacketQueueStatsReporter(provider);
|
||||
packetQueueStatsCollectors[uuid] = new PacketQueueStatsCollector(provider);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -86,9 +89,9 @@ namespace OpenSim.Framework.Statistics
|
|||
/// <param name="uuid">An agent LLUUID</param>
|
||||
public void DeregisterPacketQueueStatsProvider(LLUUID uuid)
|
||||
{
|
||||
lock (packetQueueStatsReporters)
|
||||
lock (packetQueueStatsCollectors)
|
||||
{
|
||||
packetQueueStatsReporters.Remove(uuid);
|
||||
packetQueueStatsCollectors.Remove(uuid);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -118,10 +121,10 @@ Texture cache contains {2,6} textures using {3,10:0.000}K" + Environment.NewLine
|
|||
"Send", "In", "Out", "Resend", "Land", "Wind", "Cloud", "Task", "Texture", "Asset"));
|
||||
sb.Append(Environment.NewLine);
|
||||
|
||||
foreach (LLUUID key in packetQueueStatsReporters.Keys)
|
||||
foreach (LLUUID key in packetQueueStatsCollectors.Keys)
|
||||
{
|
||||
sb.Append(string.Format("{0}: ", key));
|
||||
sb.Append(packetQueueStatsReporters[key].Report());
|
||||
sb.Append(packetQueueStatsCollectors[key].Report());
|
||||
sb.Append(Environment.NewLine);
|
||||
}
|
||||
|
||||
|
@ -132,11 +135,11 @@ Texture cache contains {2,6} textures using {3,10:0.000}K" + Environment.NewLine
|
|||
/// <summary>
|
||||
/// Pull packet queue stats from packet queues and report
|
||||
/// </summary>
|
||||
public class PacketQueueStatsReporter
|
||||
public class PacketQueueStatsCollector
|
||||
{
|
||||
private IPullStatsProvider m_statsProvider;
|
||||
|
||||
public PacketQueueStatsReporter(IPullStatsProvider provider)
|
||||
public PacketQueueStatsCollector(IPullStatsProvider provider)
|
||||
{
|
||||
m_statsProvider = provider;
|
||||
}
|
|
@ -32,13 +32,13 @@ namespace OpenSim.Framework.Statistics
|
|||
/// </summary>
|
||||
public class StatsManager
|
||||
{
|
||||
private static AssetStatsReporter assetStats;
|
||||
private static UserStatsReporter userStats;
|
||||
private static SimExtraStatsReporter simExtraStats;
|
||||
private static AssetStatsCollector assetStats;
|
||||
private static UserStatsCollector userStats;
|
||||
private static SimExtraStatsCollector simExtraStats;
|
||||
|
||||
public static AssetStatsReporter AssetStats { get { return assetStats; } }
|
||||
public static UserStatsReporter UserStats { get { return userStats; } }
|
||||
public static SimExtraStatsReporter SimExtraStats { get { return simExtraStats; } }
|
||||
public static AssetStatsCollector AssetStats { get { return assetStats; } }
|
||||
public static UserStatsCollector UserStats { get { return userStats; } }
|
||||
public static SimExtraStatsCollector SimExtraStats { get { return simExtraStats; } }
|
||||
|
||||
private StatsManager() {}
|
||||
|
||||
|
@ -48,7 +48,7 @@ namespace OpenSim.Framework.Statistics
|
|||
/// </summary>
|
||||
public static void StartCollectingAssetStats()
|
||||
{
|
||||
assetStats = new AssetStatsReporter();
|
||||
assetStats = new AssetStatsCollector();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -57,7 +57,7 @@ namespace OpenSim.Framework.Statistics
|
|||
/// </summary>
|
||||
public static void StartCollectingUserStats()
|
||||
{
|
||||
userStats = new UserStatsReporter();
|
||||
userStats = new UserStatsCollector();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -66,7 +66,7 @@ namespace OpenSim.Framework.Statistics
|
|||
/// </summary>
|
||||
public static void StartCollectingSimExtraStats()
|
||||
{
|
||||
simExtraStats = new SimExtraStatsReporter();
|
||||
simExtraStats = new SimExtraStatsCollector();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,9 +30,9 @@ using System.Timers;
|
|||
namespace OpenSim.Framework.Statistics
|
||||
{
|
||||
/// <summary>
|
||||
/// Description of UserStatsReporter.
|
||||
/// Collects user service statistics
|
||||
/// </summary>
|
||||
public class UserStatsReporter
|
||||
public class UserStatsCollector
|
||||
{
|
||||
private Timer ageStatsTimer = new Timer(24 * 60 * 60 * 1000);
|
||||
|
||||
|
@ -48,7 +48,7 @@ namespace OpenSim.Framework.Statistics
|
|||
private int logouts;
|
||||
public int Logouts { get { return logouts; } }
|
||||
|
||||
public UserStatsReporter()
|
||||
public UserStatsCollector()
|
||||
{
|
||||
ageStatsTimer.Elapsed += new ElapsedEventHandler(OnAgeing);
|
||||
ageStatsTimer.Enabled = true;
|
Loading…
Reference in New Issue