aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-02-07 23:03:53 +0000
committerJustin Clark-Casey (justincc)2012-02-07 23:03:53 +0000
commitc87751a822db328145963782f0f10adb23e32d39 (patch)
treedf4df50bd8439c3ab68e69543fda8db4cdfb72c0 /OpenSim
parentAdd url to logging if SynchronousRestFormsRequester.MakRequest() throws an ex... (diff)
downloadopensim-SC_OLD-c87751a822db328145963782f0f10adb23e32d39.zip
opensim-SC_OLD-c87751a822db328145963782f0f10adb23e32d39.tar.gz
opensim-SC_OLD-c87751a822db328145963782f0f10adb23e32d39.tar.bz2
opensim-SC_OLD-c87751a822db328145963782f0f10adb23e32d39.tar.xz
Add start GC memory and end GC memory to object stress test printouts.
This illustrates that references to Scene, SOG, etc. are not currently being released when a stress test ends (or at regression test end in general). This means even the current stress tests take much more memory than they need, a problem that will have to be addressed.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs3
-rw-r--r--OpenSim/Tests/Common/Mock/TestScene.cs5
-rw-r--r--OpenSim/Tests/Torture/ObjectTortureTests.cs16
-rw-r--r--OpenSim/Tests/Torture/ScriptTortureTests.cs2
4 files changed, 22 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 8939342..b724135 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -567,7 +567,8 @@ namespace OpenSim.Region.Framework.Scenes
567 567
568// ~SceneObjectGroup() 568// ~SceneObjectGroup()
569// { 569// {
570// m_log.DebugFormat("[SCENE OBJECT GROUP]: Destructor called for {0}, local id {1}", Name, LocalId); 570// //m_log.DebugFormat("[SCENE OBJECT GROUP]: Destructor called for {0}, local id {1}", Name, LocalId);
571// Console.WriteLine("Destructor called for {0}, local id {1}", Name, LocalId);
571// } 572// }
572 573
573 #region Constructors 574 #region Constructors
diff --git a/OpenSim/Tests/Common/Mock/TestScene.cs b/OpenSim/Tests/Common/Mock/TestScene.cs
index 07bcdce..328cd2b 100644
--- a/OpenSim/Tests/Common/Mock/TestScene.cs
+++ b/OpenSim/Tests/Common/Mock/TestScene.cs
@@ -47,6 +47,11 @@ namespace OpenSim.Tests.Common.Mock
47 dumpAssetsToFile, config, simulatorVersion) 47 dumpAssetsToFile, config, simulatorVersion)
48 { 48 {
49 } 49 }
50
51 ~TestScene()
52 {
53 Console.WriteLine("TestScene destructor called for {0}", RegionInfo.RegionName);
54 }
50 55
51 /// <summary> 56 /// <summary>
52 /// Temporarily override session authentication for tests (namely teleport). 57 /// Temporarily override session authentication for tests (namely teleport).
diff --git a/OpenSim/Tests/Torture/ObjectTortureTests.cs b/OpenSim/Tests/Torture/ObjectTortureTests.cs
index 444b7ec..74b336e 100644
--- a/OpenSim/Tests/Torture/ObjectTortureTests.cs
+++ b/OpenSim/Tests/Torture/ObjectTortureTests.cs
@@ -131,7 +131,7 @@ namespace OpenSim.Tests.Torture
131 131
132 TimeSpan elapsed = DateTime.Now - start; 132 TimeSpan elapsed = DateTime.Now - start;
133// long processMemoryAlloc = process.PrivateMemorySize64 - startProcessMemory; 133// long processMemoryAlloc = process.PrivateMemorySize64 - startProcessMemory;
134 long processGcAlloc = GC.GetTotalMemory(false) - startGcMemory; 134 long endGcMemory = GC.GetTotalMemory(false);
135 135
136 for (int i = 1; i <= objectsToAdd; i++) 136 for (int i = 1; i <= objectsToAdd; i++)
137 { 137 {
@@ -141,9 +141,19 @@ namespace OpenSim.Tests.Torture
141 string.Format("Object {0} could not be retrieved", i)); 141 string.Format("Object {0} could not be retrieved", i));
142 } 142 }
143 143
144 // This does not work to fire the SceneObjectGroup destructors - something else is hanging on to them.
145// scene.DeleteAllSceneObjects();
146
144 Console.WriteLine( 147 Console.WriteLine(
145 "Took {0}ms, {1}MB to create {2} objects each containing {3} prim(s)", 148 "Took {0}ms, {1}MB ({2} - {3}) to create {4} objects each containing {5} prim(s)",
146 Math.Round(elapsed.TotalMilliseconds), processGcAlloc / 1024 / 1024, objectsToAdd, primsInEachObject); 149 Math.Round(elapsed.TotalMilliseconds),
150 (endGcMemory - startGcMemory) / 1024 / 1024,
151 endGcMemory / 1024 / 1024,
152 startGcMemory / 1024 / 1024,
153 objectsToAdd,
154 primsInEachObject);
155
156 scene = null;
147 } 157 }
148 } 158 }
149} \ No newline at end of file 159} \ No newline at end of file
diff --git a/OpenSim/Tests/Torture/ScriptTortureTests.cs b/OpenSim/Tests/Torture/ScriptTortureTests.cs
index c0239ba..d94bbde 100644
--- a/OpenSim/Tests/Torture/ScriptTortureTests.cs
+++ b/OpenSim/Tests/Torture/ScriptTortureTests.cs
@@ -107,6 +107,8 @@ namespace OpenSim.Tests.Torture
107 m_expectedChatMessages = scriptsToCreate; 107 m_expectedChatMessages = scriptsToCreate;
108 int startingObjectIdTail = 0x100; 108 int startingObjectIdTail = 0x100;
109 109
110 GC.Collect();
111
110 for (int idTail = startingObjectIdTail;idTail < startingObjectIdTail + scriptsToCreate; idTail++) 112 for (int idTail = startingObjectIdTail;idTail < startingObjectIdTail + scriptsToCreate; idTail++)
111 { 113 {
112 AddObjectAndScript(idTail, userId); 114 AddObjectAndScript(idTail, userId);