* Add very basic initial login stats to the user server

* Typing 'stats' on the command line will given total number of successful logins today and yesterday
* A little bit more to come, probably
* Refactoring will follow next
This commit is contained in:
Justin Clarke Casey
2008-01-25 19:24:25 +00:00
parent f96d6ea2cd
commit 90c853685c
10 changed files with 206 additions and 22 deletions

View File

@@ -327,9 +327,10 @@ namespace OpenSim
inventoryService, backendService, backendService, m_dumpAssetsToFile);
m_commsManager = localComms;
// TODO No user stats collection yet for standalone
m_loginService =
new LocalLoginService(userService, m_standaloneWelcomeMessage, localComms, m_networkServersInfo,
m_standaloneAuthenticate);
null, m_standaloneAuthenticate);
m_loginService.OnLoginToRegion += backendService.AddNewSession;
// XMLRPC action

View File

@@ -34,6 +34,7 @@ using libsecondlife;
using OpenSim.Framework;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Console;
using OpenSim.Framework.Statistics;
using OpenSim.Framework.UserManagement;
using InventoryFolder=OpenSim.Framework.InventoryFolder;
@@ -52,9 +53,10 @@ namespace OpenSim.Region.Communications.Local
public event LoginToRegionEvent OnLoginToRegion;
public LocalLoginService(UserManagerBase userManager, string welcomeMess, CommunicationsLocal parent,
NetworkServersInfo serversInfo, bool authenticate)
: base(userManager, parent.UserProfileCacheService.libraryRoot, welcomeMess)
public LocalLoginService(UserManagerBase userManager, string welcomeMess,
CommunicationsLocal parent, NetworkServersInfo serversInfo,
UserStatsReporter statsCollector, bool authenticate)
: base(userManager, parent.UserProfileCacheService.libraryRoot, statsCollector, welcomeMess)
{
m_Parent = parent;
this.serversInfo = serversInfo;
@@ -228,4 +230,4 @@ namespace OpenSim.Region.Communications.Local
}
}
}
}

View File

@@ -88,7 +88,8 @@ namespace SimpleApp
m_commsManager = localComms;
LocalLoginService loginService =
new LocalLoginService(userService, String.Empty, localComms, m_networkServersInfo, false);
new LocalLoginService(
userService, String.Empty, localComms, m_networkServersInfo, null, false);
loginService.OnLoginToRegion += backendService.AddNewSession;
m_httpServer.AddXmlRPCHandler("login_to_simulator", loginService.XmlRpcLoginMethod);