aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Statistics/StatsManager.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-02-04 16:22:58 +0000
committerJustin Clarke Casey2008-02-04 16:22:58 +0000
commita1c9349d4765833691e7816d7f4df7bd37b9ee36 (patch)
tree2e108496bc6761f6ed1ec671a97bf6b4ba5e6137 /OpenSim/Framework/Statistics/StatsManager.cs
parent* Added note in CONTRIBUTORS.txt for _someone/mikkopa - RealXtend (diff)
downloadopensim-SC-a1c9349d4765833691e7816d7f4df7bd37b9ee36.zip
opensim-SC-a1c9349d4765833691e7816d7f4df7bd37b9ee36.tar.gz
opensim-SC-a1c9349d4765833691e7816d7f4df7bd37b9ee36.tar.bz2
opensim-SC-a1c9349d4765833691e7816d7f4df7bd37b9ee36.tar.xz
Refactor only: serve stats objects directly through StatsManager singleton
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Statistics/StatsManager.cs28
1 files changed, 24 insertions, 4 deletions
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 }