aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Statistics
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-01-28 22:00:38 +0000
committerJustin Clarke Casey2008-01-28 22:00:38 +0000
commitbeefbb46d22d318d1964af16b3e4601e7e23709f (patch)
tree96670d4f9e7c463827e0ff2f394193305dcf65e0 /OpenSim/Framework/Statistics
parent* Move AssetStatsReporter to Framework.Statistics (diff)
downloadopensim-SC_OLD-beefbb46d22d318d1964af16b3e4601e7e23709f.zip
opensim-SC_OLD-beefbb46d22d318d1964af16b3e4601e7e23709f.tar.gz
opensim-SC_OLD-beefbb46d22d318d1964af16b3e4601e7e23709f.tar.bz2
opensim-SC_OLD-beefbb46d22d318d1964af16b3e4601e7e23709f.tar.xz
* Add total logouts (and total logins) to server side user stats
* Passing the stats collector through object chains is not ideal - this will change when more stats come in * This change will need a prebuild
Diffstat (limited to 'OpenSim/Framework/Statistics')
-rw-r--r--OpenSim/Framework/Statistics/UserStatsReporter.cs20
1 files changed, 16 insertions, 4 deletions
diff --git a/OpenSim/Framework/Statistics/UserStatsReporter.cs b/OpenSim/Framework/Statistics/UserStatsReporter.cs
index 9b3a13f..bd4f95b 100644
--- a/OpenSim/Framework/Statistics/UserStatsReporter.cs
+++ b/OpenSim/Framework/Statistics/UserStatsReporter.cs
@@ -42,7 +42,13 @@ namespace OpenSim.Framework.Statistics
42 public int SuccessfulLoginsToday { get { return successfulLoginsToday; } } 42 public int SuccessfulLoginsToday { get { return successfulLoginsToday; } }
43 43
44 private int successfulLoginsYesterday; 44 private int successfulLoginsYesterday;
45 public int SuccessfulLoginsYesterday { get { return successfulLoginsYesterday; } } 45 public int SuccessfulLoginsYesterday { get { return successfulLoginsYesterday; } }
46
47 private int successfulLogins;
48 public int SuccessfulLogins { get { return successfulLogins; } }
49
50 private int logouts;
51 public int Logouts { get { return logouts; } }
46 52
47 public UserStatsReporter() 53 public UserStatsReporter()
48 { 54 {
@@ -64,8 +70,14 @@ namespace OpenSim.Framework.Statistics
64 /// </summary> 70 /// </summary>
65 public void AddSuccessfulLogin() 71 public void AddSuccessfulLogin()
66 { 72 {
73 successfulLogins++;
67 successfulLoginsToday++; 74 successfulLoginsToday++;
68 } 75 }
76
77 public void AddLogout()
78 {
79 logouts++;
80 }
69 81
70 /// <summary> 82 /// <summary>
71 /// Report back collected statistical information. 83 /// Report back collected statistical information.
@@ -74,9 +86,9 @@ namespace OpenSim.Framework.Statistics
74 public string Report() 86 public string Report()
75 { 87 {
76 return string.Format( 88 return string.Format(
77@"Successful logins today : {0} 89@"Successful logins total : {0}, today : {1}, yesterday : {2}
78Successful logins yesterday : {1}", 90 Logouts total : {3}",
79 SuccessfulLoginsToday, SuccessfulLoginsYesterday); 91 SuccessfulLogins, SuccessfulLoginsToday, SuccessfulLoginsYesterday, Logouts);
80 } 92 }
81 } 93 }
82} 94}