aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorUbitUmarov2016-11-20 14:42:30 +0000
committerUbitUmarov2016-11-20 14:42:30 +0000
commit0ce034d5d629c77af09abf35a08dd432c0a07563 (patch)
tree031375f92065fcfd2a05f1497f378eecec275b0d
parentrevert more object references removal on clients close because 2 many code pa... (diff)
parentInclude config option to disable stats thread showing read/write stats in con... (diff)
downloadopensim-SC-0ce034d5d629c77af09abf35a08dd432c0a07563.zip
opensim-SC-0ce034d5d629c77af09abf35a08dd432c0a07563.tar.gz
opensim-SC-0ce034d5d629c77af09abf35a08dd432c0a07563.tar.bz2
opensim-SC-0ce034d5d629c77af09abf35a08dd432c0a07563.tar.xz
Merge branch 'master' of opensimulator.org:/var/git/opensim
-rw-r--r--OpenSim/Framework/RestClient.cs4
-rw-r--r--OpenSim/Services/FSAssetService/FSAssetService.cs30
-rw-r--r--bin/Robust.HG.ini.example3
-rw-r--r--bin/Robust.ini.example3
4 files changed, 30 insertions, 10 deletions
diff --git a/OpenSim/Framework/RestClient.cs b/OpenSim/Framework/RestClient.cs
index ca19392..26237de 100644
--- a/OpenSim/Framework/RestClient.cs
+++ b/OpenSim/Framework/RestClient.cs
@@ -430,11 +430,11 @@ namespace OpenSim.Framework
430 430
431 using (Stream dst = _request.GetRequestStream()) 431 using (Stream dst = _request.GetRequestStream())
432 { 432 {
433 m_log.Info("[REST]: GetRequestStream is ok"); 433 m_log.Debug("[REST]: GetRequestStream is ok");
434 434
435 byte[] buf = new byte[1024]; 435 byte[] buf = new byte[1024];
436 int length = src.Read(buf, 0, 1024); 436 int length = src.Read(buf, 0, 1024);
437 m_log.Info("[REST]: First Read is ok"); 437 m_log.Debug("[REST]: First Read is ok");
438 while (length > 0) 438 while (length > 0)
439 { 439 {
440 dst.Write(buf, 0, length); 440 dst.Write(buf, 0, length);
diff --git a/OpenSim/Services/FSAssetService/FSAssetService.cs b/OpenSim/Services/FSAssetService/FSAssetService.cs
index 9ec2d00..7f14462 100644
--- a/OpenSim/Services/FSAssetService/FSAssetService.cs
+++ b/OpenSim/Services/FSAssetService/FSAssetService.cs
@@ -77,6 +77,7 @@ namespace OpenSim.Services.FSAssetService
77 protected int m_missingAssetsFS = 0; 77 protected int m_missingAssetsFS = 0;
78 protected string m_FSBase; 78 protected string m_FSBase;
79 protected bool m_useOsgridFormat = false; 79 protected bool m_useOsgridFormat = false;
80 protected bool m_showStats = true;
80 81
81 private static bool m_Initialized; 82 private static bool m_Initialized;
82 private bool m_MainInstance; 83 private bool m_MainInstance;
@@ -186,6 +187,9 @@ namespace OpenSim.Services.FSAssetService
186 187
187 m_useOsgridFormat = assetConfig.GetBoolean("UseOsgridFormat", m_useOsgridFormat); 188 m_useOsgridFormat = assetConfig.GetBoolean("UseOsgridFormat", m_useOsgridFormat);
188 189
190 // Default is to show stats to retain original behaviour
191 m_showStats = assetConfig.GetBoolean("ShowConsoleStats", m_showStats);
192
189 if (m_MainInstance) 193 if (m_MainInstance)
190 { 194 {
191 string loader = assetConfig.GetString("DefaultAssetLoader", string.Empty); 195 string loader = assetConfig.GetString("DefaultAssetLoader", string.Empty);
@@ -203,8 +207,12 @@ namespace OpenSim.Services.FSAssetService
203 207
204 m_WriterThread = new Thread(Writer); 208 m_WriterThread = new Thread(Writer);
205 m_WriterThread.Start(); 209 m_WriterThread.Start();
206 m_StatsThread = new Thread(Stats); 210
207 m_StatsThread.Start(); 211 if (m_showStats)
212 {
213 m_StatsThread = new Thread(Stats);
214 m_StatsThread.Start();
215 }
208 } 216 }
209 217
210 m_log.Info("[FSASSETS]: FS asset service enabled"); 218 m_log.Info("[FSASSETS]: FS asset service enabled");
@@ -441,7 +449,7 @@ namespace OpenSim.Services.FSAssetService
441 Store(asset); 449 Store(asset);
442 } 450 }
443 } 451 }
444 if (asset == null) 452 if (asset == null && m_showStats)
445 { 453 {
446 // m_log.InfoFormat("[FSASSETS]: Asset {0} not found", id); 454 // m_log.InfoFormat("[FSASSETS]: Asset {0} not found", id);
447 m_missingAssets++; 455 m_missingAssets++;
@@ -469,8 +477,11 @@ namespace OpenSim.Services.FSAssetService
469 } 477 }
470 } 478 }
471 if (asset == null) 479 if (asset == null)
472 m_missingAssetsFS++; 480 {
473 // m_log.InfoFormat("[FSASSETS]: Asset {0}, hash {1} not found in FS", id, hash); 481 if (m_showStats)
482 m_missingAssetsFS++;
483 // m_log.InfoFormat("[FSASSETS]: Asset {0}, hash {1} not found in FS", id, hash);
484 }
474 else 485 else
475 { 486 {
476 // Deal with bug introduced in Oct. 20 (1eb3e6cc43e2a7b4053bc1185c7c88e22356c5e8) 487 // Deal with bug introduced in Oct. 20 (1eb3e6cc43e2a7b4053bc1185c7c88e22356c5e8)
@@ -484,10 +495,13 @@ namespace OpenSim.Services.FSAssetService
484 } 495 }
485 } 496 }
486 497
487 lock (m_statsLock) 498 if (m_showStats)
488 { 499 {
489 m_readTicks += Environment.TickCount - startTime; 500 lock (m_statsLock)
490 m_readCount++; 501 {
502 m_readTicks += Environment.TickCount - startTime;
503 m_readCount++;
504 }
491 } 505 }
492 506
493 // Deal with bug introduced in Oct. 20 (1eb3e6cc43e2a7b4053bc1185c7c88e22356c5e8) 507 // Deal with bug introduced in Oct. 20 (1eb3e6cc43e2a7b4053bc1185c7c88e22356c5e8)
diff --git a/bin/Robust.HG.ini.example b/bin/Robust.HG.ini.example
index ad07674..c231a8a 100644
--- a/bin/Robust.HG.ini.example
+++ b/bin/Robust.HG.ini.example
@@ -242,6 +242,9 @@
242 ;; Reduces DB calls if asset is requested often. Default value 0 will always update access time 242 ;; Reduces DB calls if asset is requested often. Default value 0 will always update access time
243 ;DaysBetweenAccessTimeUpdates = 30 243 ;DaysBetweenAccessTimeUpdates = 30
244 244
245 ;; Should FSAssets print read/write stats to the robust console, default is true
246 ;ShowConsoleStats = true
247
245 ;; FSAssets Custom Database Config (Leave blank to use grids default database configuration) 248 ;; FSAssets Custom Database Config (Leave blank to use grids default database configuration)
246 ;StorageProvider = "" 249 ;StorageProvider = ""
247 ;ConnectionString = "" 250 ;ConnectionString = ""
diff --git a/bin/Robust.ini.example b/bin/Robust.ini.example
index 099d4da..743b23d 100644
--- a/bin/Robust.ini.example
+++ b/bin/Robust.ini.example
@@ -204,6 +204,9 @@
204 ;; Reduces DB calls if asset is requested often. Default value 0 will always update access time 204 ;; Reduces DB calls if asset is requested often. Default value 0 will always update access time
205 ;DaysBetweenAccessTimeUpdates = 30 205 ;DaysBetweenAccessTimeUpdates = 30
206 206
207 ;; Should FSAssets print read/write stats to the robust console, default is true
208 ;ShowConsoleStats = true
209
207 ;; FSAssets Custom Database Config (Leave blank to use grids default database configuration) 210 ;; FSAssets Custom Database Config (Leave blank to use grids default database configuration)
208 ;StorageProvider = "" 211 ;StorageProvider = ""
209 ;ConnectionString = "" 212 ;ConnectionString = ""