aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorUbitUmarov2016-11-20 14:42:30 +0000
committerUbitUmarov2016-11-20 14:42:30 +0000
commit0ce034d5d629c77af09abf35a08dd432c0a07563 (patch)
tree031375f92065fcfd2a05f1497f378eecec275b0d /OpenSim
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_OLD-0ce034d5d629c77af09abf35a08dd432c0a07563.zip
opensim-SC_OLD-0ce034d5d629c77af09abf35a08dd432c0a07563.tar.gz
opensim-SC_OLD-0ce034d5d629c77af09abf35a08dd432c0a07563.tar.bz2
opensim-SC_OLD-0ce034d5d629c77af09abf35a08dd432c0a07563.tar.xz
Merge branch 'master' of opensimulator.org:/var/git/opensim
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/RestClient.cs4
-rw-r--r--OpenSim/Services/FSAssetService/FSAssetService.cs30
2 files changed, 24 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)