diff options
author | Justin Clarke Casey | 2008-05-14 21:27:54 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-05-14 21:27:54 +0000 |
commit | 56faeafdae5b4b76593e268bc994a7f663bd5685 (patch) | |
tree | 720efa22432151d2faaab08c61065a0ba02a047f /OpenSim/Framework/Statistics | |
parent | * Fixed attaching objects that are in-world. (diff) | |
download | opensim-SC-56faeafdae5b4b76593e268bc994a7f663bd5685.zip opensim-SC-56faeafdae5b4b76593e268bc994a7f663bd5685.tar.gz opensim-SC-56faeafdae5b4b76593e268bc994a7f663bd5685.tar.bz2 opensim-SC-56faeafdae5b4b76593e268bc994a7f663bd5685.tar.xz |
* Refactor: Renaming non viewer statistics classes from Reporters to Collectors - this seems more intuitive
Diffstat (limited to 'OpenSim/Framework/Statistics')
-rw-r--r-- | OpenSim/Framework/Statistics/AssetStatsCollector.cs (renamed from OpenSim/Framework/Statistics/AssetStatsReporter.cs) | 6 | ||||
-rw-r--r-- | OpenSim/Framework/Statistics/Interfaces/IPullStatsProvider.cs | 2 | ||||
-rw-r--r-- | OpenSim/Framework/Statistics/SimExtraStatsCollector.cs (renamed from OpenSim/Framework/Statistics/SimExtraStatsReporter.cs) | 25 | ||||
-rw-r--r-- | OpenSim/Framework/Statistics/StatsManager.cs | 18 | ||||
-rw-r--r-- | OpenSim/Framework/Statistics/UserStatsCollector.cs (renamed from OpenSim/Framework/Statistics/UserStatsReporter.cs) | 6 |
5 files changed, 30 insertions, 27 deletions
diff --git a/OpenSim/Framework/Statistics/AssetStatsReporter.cs b/OpenSim/Framework/Statistics/AssetStatsCollector.cs index 66eb471..afc42d2 100644 --- a/OpenSim/Framework/Statistics/AssetStatsReporter.cs +++ b/OpenSim/Framework/Statistics/AssetStatsCollector.cs | |||
@@ -31,9 +31,9 @@ using System.Timers; | |||
31 | namespace OpenSim.Framework.Statistics | 31 | namespace OpenSim.Framework.Statistics |
32 | { | 32 | { |
33 | /// <summary> | 33 | /// <summary> |
34 | /// Collects and reports information on the requests made to the asset server | 34 | /// Asset service statistics collection |
35 | /// </summary> | 35 | /// </summary> |
36 | public class AssetStatsReporter | 36 | public class AssetStatsCollector |
37 | { | 37 | { |
38 | private Timer ageStatsTimer = new Timer(24 * 60 * 60 * 1000); | 38 | private Timer ageStatsTimer = new Timer(24 * 60 * 60 * 1000); |
39 | private DateTime startTime = DateTime.Now; | 39 | private DateTime startTime = DateTime.Now; |
@@ -48,7 +48,7 @@ namespace OpenSim.Framework.Statistics | |||
48 | public long AssetRequestsYesterday { get { return assetRequestsYesterday; } } | 48 | public long AssetRequestsYesterday { get { return assetRequestsYesterday; } } |
49 | public long AssetRequestsNotFoundYesterday { get { return assetRequestsNotFoundYesterday; } } | 49 | public long AssetRequestsNotFoundYesterday { get { return assetRequestsNotFoundYesterday; } } |
50 | 50 | ||
51 | public AssetStatsReporter() | 51 | public AssetStatsCollector() |
52 | { | 52 | { |
53 | ageStatsTimer.Elapsed += new ElapsedEventHandler(OnAgeing); | 53 | ageStatsTimer.Elapsed += new ElapsedEventHandler(OnAgeing); |
54 | ageStatsTimer.Enabled = true; | 54 | ageStatsTimer.Enabled = true; |
diff --git a/OpenSim/Framework/Statistics/Interfaces/IPullStatsProvider.cs b/OpenSim/Framework/Statistics/Interfaces/IPullStatsProvider.cs index 0d85919..9a3ee8e 100644 --- a/OpenSim/Framework/Statistics/Interfaces/IPullStatsProvider.cs +++ b/OpenSim/Framework/Statistics/Interfaces/IPullStatsProvider.cs | |||
@@ -28,7 +28,7 @@ | |||
28 | namespace OpenSim.Framework.Statistics.Interfaces | 28 | namespace OpenSim.Framework.Statistics.Interfaces |
29 | { | 29 | { |
30 | /// <summary> | 30 | /// <summary> |
31 | /// Description of IPullStatsProvider. | 31 | /// Implemented by objects which allow statistical information to be pulled from them. |
32 | /// </summary> | 32 | /// </summary> |
33 | public interface IPullStatsProvider | 33 | public interface IPullStatsProvider |
34 | { | 34 | { |
diff --git a/OpenSim/Framework/Statistics/SimExtraStatsReporter.cs b/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs index 567d8dd..4e69d17 100644 --- a/OpenSim/Framework/Statistics/SimExtraStatsReporter.cs +++ b/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs | |||
@@ -33,7 +33,10 @@ using OpenSim.Framework.Statistics.Interfaces; | |||
33 | 33 | ||
34 | namespace OpenSim.Framework.Statistics | 34 | namespace OpenSim.Framework.Statistics |
35 | { | 35 | { |
36 | public class SimExtraStatsReporter | 36 | /// <summary> |
37 | /// Collects sim statistics which aren't already being collected for the linden viewer's statistics pane | ||
38 | /// </summary> | ||
39 | public class SimExtraStatsCollector | ||
37 | { | 40 | { |
38 | private long assetsInCache; | 41 | private long assetsInCache; |
39 | private long texturesInCache; | 42 | private long texturesInCache; |
@@ -48,8 +51,8 @@ namespace OpenSim.Framework.Statistics | |||
48 | /// <summary> | 51 | /// <summary> |
49 | /// Retain a dictionary of all packet queues stats reporters | 52 | /// Retain a dictionary of all packet queues stats reporters |
50 | /// </summary> | 53 | /// </summary> |
51 | private IDictionary<LLUUID, PacketQueueStatsReporter> packetQueueStatsReporters | 54 | private IDictionary<LLUUID, PacketQueueStatsCollector> packetQueueStatsCollectors |
52 | = new Dictionary<LLUUID, PacketQueueStatsReporter>(); | 55 | = new Dictionary<LLUUID, PacketQueueStatsCollector>(); |
53 | 56 | ||
54 | public void AddAsset(AssetBase asset) | 57 | public void AddAsset(AssetBase asset) |
55 | { | 58 | { |
@@ -74,9 +77,9 @@ namespace OpenSim.Framework.Statistics | |||
74 | /// <param name="provider"></param> | 77 | /// <param name="provider"></param> |
75 | public void RegisterPacketQueueStatsProvider(LLUUID uuid, IPullStatsProvider provider) | 78 | public void RegisterPacketQueueStatsProvider(LLUUID uuid, IPullStatsProvider provider) |
76 | { | 79 | { |
77 | lock (packetQueueStatsReporters) | 80 | lock (packetQueueStatsCollectors) |
78 | { | 81 | { |
79 | packetQueueStatsReporters[uuid] = new PacketQueueStatsReporter(provider); | 82 | packetQueueStatsCollectors[uuid] = new PacketQueueStatsCollector(provider); |
80 | } | 83 | } |
81 | } | 84 | } |
82 | 85 | ||
@@ -86,9 +89,9 @@ namespace OpenSim.Framework.Statistics | |||
86 | /// <param name="uuid">An agent LLUUID</param> | 89 | /// <param name="uuid">An agent LLUUID</param> |
87 | public void DeregisterPacketQueueStatsProvider(LLUUID uuid) | 90 | public void DeregisterPacketQueueStatsProvider(LLUUID uuid) |
88 | { | 91 | { |
89 | lock (packetQueueStatsReporters) | 92 | lock (packetQueueStatsCollectors) |
90 | { | 93 | { |
91 | packetQueueStatsReporters.Remove(uuid); | 94 | packetQueueStatsCollectors.Remove(uuid); |
92 | } | 95 | } |
93 | } | 96 | } |
94 | 97 | ||
@@ -118,10 +121,10 @@ Texture cache contains {2,6} textures using {3,10:0.000}K" + Environment.NewLine | |||
118 | "Send", "In", "Out", "Resend", "Land", "Wind", "Cloud", "Task", "Texture", "Asset")); | 121 | "Send", "In", "Out", "Resend", "Land", "Wind", "Cloud", "Task", "Texture", "Asset")); |
119 | sb.Append(Environment.NewLine); | 122 | sb.Append(Environment.NewLine); |
120 | 123 | ||
121 | foreach (LLUUID key in packetQueueStatsReporters.Keys) | 124 | foreach (LLUUID key in packetQueueStatsCollectors.Keys) |
122 | { | 125 | { |
123 | sb.Append(string.Format("{0}: ", key)); | 126 | sb.Append(string.Format("{0}: ", key)); |
124 | sb.Append(packetQueueStatsReporters[key].Report()); | 127 | sb.Append(packetQueueStatsCollectors[key].Report()); |
125 | sb.Append(Environment.NewLine); | 128 | sb.Append(Environment.NewLine); |
126 | } | 129 | } |
127 | 130 | ||
@@ -132,11 +135,11 @@ Texture cache contains {2,6} textures using {3,10:0.000}K" + Environment.NewLine | |||
132 | /// <summary> | 135 | /// <summary> |
133 | /// Pull packet queue stats from packet queues and report | 136 | /// Pull packet queue stats from packet queues and report |
134 | /// </summary> | 137 | /// </summary> |
135 | public class PacketQueueStatsReporter | 138 | public class PacketQueueStatsCollector |
136 | { | 139 | { |
137 | private IPullStatsProvider m_statsProvider; | 140 | private IPullStatsProvider m_statsProvider; |
138 | 141 | ||
139 | public PacketQueueStatsReporter(IPullStatsProvider provider) | 142 | public PacketQueueStatsCollector(IPullStatsProvider provider) |
140 | { | 143 | { |
141 | m_statsProvider = provider; | 144 | m_statsProvider = provider; |
142 | } | 145 | } |
diff --git a/OpenSim/Framework/Statistics/StatsManager.cs b/OpenSim/Framework/Statistics/StatsManager.cs index 8bbe6c1..10251a5 100644 --- a/OpenSim/Framework/Statistics/StatsManager.cs +++ b/OpenSim/Framework/Statistics/StatsManager.cs | |||
@@ -32,13 +32,13 @@ namespace OpenSim.Framework.Statistics | |||
32 | /// </summary> | 32 | /// </summary> |
33 | public class StatsManager | 33 | public class StatsManager |
34 | { | 34 | { |
35 | private static AssetStatsReporter assetStats; | 35 | private static AssetStatsCollector assetStats; |
36 | private static UserStatsReporter userStats; | 36 | private static UserStatsCollector userStats; |
37 | private static SimExtraStatsReporter simExtraStats; | 37 | private static SimExtraStatsCollector simExtraStats; |
38 | 38 | ||
39 | public static AssetStatsReporter AssetStats { get { return assetStats; } } | 39 | public static AssetStatsCollector AssetStats { get { return assetStats; } } |
40 | public static UserStatsReporter UserStats { get { return userStats; } } | 40 | public static UserStatsCollector UserStats { get { return userStats; } } |
41 | public static SimExtraStatsReporter SimExtraStats { get { return simExtraStats; } } | 41 | public static SimExtraStatsCollector SimExtraStats { get { return simExtraStats; } } |
42 | 42 | ||
43 | private StatsManager() {} | 43 | private StatsManager() {} |
44 | 44 | ||
@@ -48,7 +48,7 @@ namespace OpenSim.Framework.Statistics | |||
48 | /// </summary> | 48 | /// </summary> |
49 | public static void StartCollectingAssetStats() | 49 | public static void StartCollectingAssetStats() |
50 | { | 50 | { |
51 | assetStats = new AssetStatsReporter(); | 51 | assetStats = new AssetStatsCollector(); |
52 | } | 52 | } |
53 | 53 | ||
54 | /// <summary> | 54 | /// <summary> |
@@ -57,7 +57,7 @@ namespace OpenSim.Framework.Statistics | |||
57 | /// </summary> | 57 | /// </summary> |
58 | public static void StartCollectingUserStats() | 58 | public static void StartCollectingUserStats() |
59 | { | 59 | { |
60 | userStats = new UserStatsReporter(); | 60 | userStats = new UserStatsCollector(); |
61 | } | 61 | } |
62 | 62 | ||
63 | /// <summary> | 63 | /// <summary> |
@@ -66,7 +66,7 @@ namespace OpenSim.Framework.Statistics | |||
66 | /// </summary> | 66 | /// </summary> |
67 | public static void StartCollectingSimExtraStats() | 67 | public static void StartCollectingSimExtraStats() |
68 | { | 68 | { |
69 | simExtraStats = new SimExtraStatsReporter(); | 69 | simExtraStats = new SimExtraStatsCollector(); |
70 | } | 70 | } |
71 | } | 71 | } |
72 | } | 72 | } |
diff --git a/OpenSim/Framework/Statistics/UserStatsReporter.cs b/OpenSim/Framework/Statistics/UserStatsCollector.cs index ce82615..80cd46e 100644 --- a/OpenSim/Framework/Statistics/UserStatsReporter.cs +++ b/OpenSim/Framework/Statistics/UserStatsCollector.cs | |||
@@ -30,9 +30,9 @@ using System.Timers; | |||
30 | namespace OpenSim.Framework.Statistics | 30 | namespace OpenSim.Framework.Statistics |
31 | { | 31 | { |
32 | /// <summary> | 32 | /// <summary> |
33 | /// Description of UserStatsReporter. | 33 | /// Collects user service statistics |
34 | /// </summary> | 34 | /// </summary> |
35 | public class UserStatsReporter | 35 | public class UserStatsCollector |
36 | { | 36 | { |
37 | private Timer ageStatsTimer = new Timer(24 * 60 * 60 * 1000); | 37 | private Timer ageStatsTimer = new Timer(24 * 60 * 60 * 1000); |
38 | 38 | ||
@@ -48,7 +48,7 @@ namespace OpenSim.Framework.Statistics | |||
48 | private int logouts; | 48 | private int logouts; |
49 | public int Logouts { get { return logouts; } } | 49 | public int Logouts { get { return logouts; } } |
50 | 50 | ||
51 | public UserStatsReporter() | 51 | public UserStatsCollector() |
52 | { | 52 | { |
53 | ageStatsTimer.Elapsed += new ElapsedEventHandler(OnAgeing); | 53 | ageStatsTimer.Elapsed += new ElapsedEventHandler(OnAgeing); |
54 | ageStatsTimer.Enabled = true; | 54 | ageStatsTimer.Enabled = true; |