mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 03:45:35 +08:00
* 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:
@@ -53,7 +53,7 @@ namespace OpenSim.Grid.AssetServer
|
||||
|
||||
private IAssetProvider m_assetProvider;
|
||||
|
||||
private AssetStatsReporter stats;
|
||||
protected AssetStatsReporter m_stats;
|
||||
|
||||
[STAThread]
|
||||
public static void Main(string[] args)
|
||||
@@ -100,10 +100,9 @@ namespace OpenSim.Grid.AssetServer
|
||||
m_console.Verbose("ASSET", "Starting HTTP process");
|
||||
BaseHttpServer httpServer = new BaseHttpServer(m_config.HttpPort);
|
||||
|
||||
// XXX Hardcoded - could be a plugin later on
|
||||
stats = new AssetStatsReporter();
|
||||
m_stats = new AssetStatsReporter();
|
||||
|
||||
httpServer.AddStreamHandler(new GetAssetStreamHandler(this, m_assetProvider, stats));
|
||||
httpServer.AddStreamHandler(new GetAssetStreamHandler(this, m_assetProvider, m_stats));
|
||||
httpServer.AddStreamHandler(new PostAssetStreamHandler(this, m_assetProvider));
|
||||
|
||||
httpServer.Start();
|
||||
@@ -179,12 +178,12 @@ namespace OpenSim.Grid.AssetServer
|
||||
case "help":
|
||||
m_console.Notice(
|
||||
@"shutdown - shutdown this asset server (USE CAUTION!)
|
||||
stats - statistical information for this asset server");
|
||||
stats - statistical information for this server");
|
||||
|
||||
break;
|
||||
|
||||
case "stats":
|
||||
MainLog.Instance.Notice("STATS", Environment.NewLine + stats.Report());
|
||||
MainLog.Instance.Notice("STATS", Environment.NewLine + m_stats.Report());
|
||||
break;
|
||||
|
||||
case "shutdown":
|
||||
|
||||
Reference in New Issue
Block a user