aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Statistics
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Statistics')
-rw-r--r--OpenSim/Framework/Statistics/AssetStatsReporter.cs2
-rw-r--r--OpenSim/Framework/Statistics/StatsManager.cs28
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;
30using System.Text; 30using System.Text;
31using System.Timers; 31using System.Timers;
32 32
33namespace OpenSim.Grid.AssetServer 33namespace 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 }