diff options
author | Justin Clarke Casey | 2008-01-23 19:09:50 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-01-23 19:09:50 +0000 |
commit | 257f2b5583b79d37bc61db961c7404346e39725e (patch) | |
tree | 6f835730aeca8faa97c0039cf54498b22caa5c19 /OpenSim/Grid/AssetServer/Main.cs | |
parent | * Library scripts can now be dragged into prims (diff) | |
download | opensim-SC_OLD-257f2b5583b79d37bc61db961c7404346e39725e.zip opensim-SC_OLD-257f2b5583b79d37bc61db961c7404346e39725e.tar.gz opensim-SC_OLD-257f2b5583b79d37bc61db961c7404346e39725e.tar.bz2 opensim-SC_OLD-257f2b5583b79d37bc61db961c7404346e39725e.tar.xz |
* Add very very very basic initial statistical information collection to asset server
* stats can be seen by typing stats on the asset server command line
* Currently collecting only raw requests for today and yesterday
* And I haven't yet tested the 24 hour rollover
Diffstat (limited to 'OpenSim/Grid/AssetServer/Main.cs')
-rw-r--r-- | OpenSim/Grid/AssetServer/Main.cs | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/OpenSim/Grid/AssetServer/Main.cs b/OpenSim/Grid/AssetServer/Main.cs index ed77e3e..4fc66f7 100644 --- a/OpenSim/Grid/AssetServer/Main.cs +++ b/OpenSim/Grid/AssetServer/Main.cs | |||
@@ -52,6 +52,8 @@ namespace OpenSim.Grid.AssetServer | |||
52 | protected IAssetLoader assetLoader = new AssetLoaderFileSystem(); | 52 | protected IAssetLoader assetLoader = new AssetLoaderFileSystem(); |
53 | 53 | ||
54 | private IAssetProvider m_assetProvider; | 54 | private IAssetProvider m_assetProvider; |
55 | |||
56 | private AssetStatsReporter stats; | ||
55 | 57 | ||
56 | [STAThread] | 58 | [STAThread] |
57 | public static void Main(string[] args) | 59 | public static void Main(string[] args) |
@@ -97,8 +99,11 @@ namespace OpenSim.Grid.AssetServer | |||
97 | 99 | ||
98 | m_console.Verbose("ASSET", "Starting HTTP process"); | 100 | m_console.Verbose("ASSET", "Starting HTTP process"); |
99 | BaseHttpServer httpServer = new BaseHttpServer(m_config.HttpPort); | 101 | BaseHttpServer httpServer = new BaseHttpServer(m_config.HttpPort); |
102 | |||
103 | // XXX Hardcoded - could be a plugin later on | ||
104 | stats = new AssetStatsReporter(); | ||
100 | 105 | ||
101 | httpServer.AddStreamHandler(new GetAssetStreamHandler(this, m_assetProvider)); | 106 | httpServer.AddStreamHandler(new GetAssetStreamHandler(this, m_assetProvider, stats)); |
102 | httpServer.AddStreamHandler(new PostAssetStreamHandler(this, m_assetProvider)); | 107 | httpServer.AddStreamHandler(new PostAssetStreamHandler(this, m_assetProvider)); |
103 | 108 | ||
104 | httpServer.Start(); | 109 | httpServer.Start(); |
@@ -172,7 +177,14 @@ namespace OpenSim.Grid.AssetServer | |||
172 | switch (cmd) | 177 | switch (cmd) |
173 | { | 178 | { |
174 | case "help": | 179 | case "help": |
175 | m_console.Notice("shutdown - shutdown this asset server (USE CAUTION!)"); | 180 | m_console.Notice( |
181 | @"shutdown - shutdown this asset server (USE CAUTION!) | ||
182 | stats - statistical information for this asset server"); | ||
183 | |||
184 | break; | ||
185 | |||
186 | case "stats": | ||
187 | MainLog.Instance.Notice("STATS", Environment.NewLine + stats.Report()); | ||
176 | break; | 188 | break; |
177 | 189 | ||
178 | case "shutdown": | 190 | case "shutdown": |
@@ -186,4 +198,4 @@ namespace OpenSim.Grid.AssetServer | |||
186 | { | 198 | { |
187 | } | 199 | } |
188 | } | 200 | } |
189 | } \ No newline at end of file | 201 | } |