diff options
author | Justin Clarke Casey | 2008-02-04 16:22:58 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-02-04 16:22:58 +0000 |
commit | a1c9349d4765833691e7816d7f4df7bd37b9ee36 (patch) | |
tree | 2e108496bc6761f6ed1ec671a97bf6b4ba5e6137 /OpenSim/Framework/Statistics | |
parent | * Added note in CONTRIBUTORS.txt for _someone/mikkopa - RealXtend (diff) | |
download | opensim-SC_OLD-a1c9349d4765833691e7816d7f4df7bd37b9ee36.zip opensim-SC_OLD-a1c9349d4765833691e7816d7f4df7bd37b9ee36.tar.gz opensim-SC_OLD-a1c9349d4765833691e7816d7f4df7bd37b9ee36.tar.bz2 opensim-SC_OLD-a1c9349d4765833691e7816d7f4df7bd37b9ee36.tar.xz |
Refactor only: serve stats objects directly through StatsManager singleton
Diffstat (limited to 'OpenSim/Framework/Statistics')
-rw-r--r-- | OpenSim/Framework/Statistics/AssetStatsReporter.cs | 2 | ||||
-rw-r--r-- | OpenSim/Framework/Statistics/StatsManager.cs | 28 |
2 files changed, 25 insertions, 5 deletions
diff --git a/OpenSim/Framework/Statistics/AssetStatsReporter.cs b/OpenSim/Framework/Statistics/AssetStatsReporter.cs index bcd3a75..4f2ef86 100644 --- a/OpenSim/Framework/Statistics/AssetStatsReporter.cs +++ b/OpenSim/Framework/Statistics/AssetStatsReporter.cs | |||
@@ -30,7 +30,7 @@ using System; | |||
30 | using System.Text; | 30 | using System.Text; |
31 | using System.Timers; | 31 | using System.Timers; |
32 | 32 | ||
33 | namespace OpenSim.Grid.AssetServer | 33 | namespace OpenSim.Framework.Statistics |
34 | { | 34 | { |
35 | /// <summary> | 35 | /// <summary> |
36 | /// Collects and reports information on the requests made to the asset server | 36 | /// Collects and reports information on the requests made to the asset server |
diff --git a/OpenSim/Framework/Statistics/StatsManager.cs b/OpenSim/Framework/Statistics/StatsManager.cs index 35040e3..842f1f1 100644 --- a/OpenSim/Framework/Statistics/StatsManager.cs +++ b/OpenSim/Framework/Statistics/StatsManager.cs | |||
@@ -33,19 +33,39 @@ namespace OpenSim.Framework.Statistics | |||
33 | /// </summary> | 33 | /// </summary> |
34 | public class StatsManager | 34 | public class StatsManager |
35 | { | 35 | { |
36 | private static AssetStatsReporter assetStats; | ||
37 | private static UserStatsReporter userStats; | ||
36 | private static SimExtraStatsReporter simExtraStats; | 38 | private static SimExtraStatsReporter simExtraStats; |
37 | 39 | ||
40 | public static AssetStatsReporter AssetStats { get { return assetStats; } } | ||
41 | public static UserStatsReporter UserStats { get { return userStats; } } | ||
38 | public static SimExtraStatsReporter SimExtraStats { get { return simExtraStats; } } | 42 | public static SimExtraStatsReporter SimExtraStats { get { return simExtraStats; } } |
39 | 43 | ||
40 | private StatsManager() | 44 | private StatsManager() {} |
45 | |||
46 | /// <summary> | ||
47 | /// Start collecting statistics related to assets. | ||
48 | /// Should only be called once. | ||
49 | /// </summary> | ||
50 | public static void StartCollectingAssetStats() | ||
41 | { | 51 | { |
52 | assetStats = new AssetStatsReporter(); | ||
42 | } | 53 | } |
43 | 54 | ||
44 | /// <summary> | 55 | /// <summary> |
45 | /// Start recording statistics. Should only be called once - calling again will reset statistic | 56 | /// Start collecting statistics related to users. |
46 | /// counts. | 57 | /// Should only be called once. |
58 | /// </summary> | ||
59 | public static void StartCollectingUserStats() | ||
60 | { | ||
61 | userStats = new UserStatsReporter(); | ||
62 | } | ||
63 | |||
64 | /// <summary> | ||
65 | /// Start collecting extra sim statistics apart from those collected for the client. | ||
66 | /// Should only be called once. | ||
47 | /// </summary> | 67 | /// </summary> |
48 | public static void StartCollecting() | 68 | public static void StartCollectingSimExtraStats() |
49 | { | 69 | { |
50 | simExtraStats = new SimExtraStatsReporter(); | 70 | simExtraStats = new SimExtraStatsReporter(); |
51 | } | 71 | } |