diff options
Diffstat (limited to 'OpenSim/Tests')
-rw-r--r-- | OpenSim/Tests/Common/Mock/TestScene.cs | 5 | ||||
-rw-r--r-- | OpenSim/Tests/Torture/ObjectTortureTests.cs | 16 | ||||
-rw-r--r-- | OpenSim/Tests/Torture/ScriptTortureTests.cs | 2 |
3 files changed, 20 insertions, 3 deletions
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); |