diff options
author | Justin Clark-Casey (justincc) | 2012-02-07 23:03:53 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-02-07 23:03:53 +0000 |
commit | c87751a822db328145963782f0f10adb23e32d39 (patch) | |
tree | df4df50bd8439c3ab68e69543fda8db4cdfb72c0 /OpenSim/Tests/Torture | |
parent | Add url to logging if SynchronousRestFormsRequester.MakRequest() throws an ex... (diff) | |
download | opensim-SC-c87751a822db328145963782f0f10adb23e32d39.zip opensim-SC-c87751a822db328145963782f0f10adb23e32d39.tar.gz opensim-SC-c87751a822db328145963782f0f10adb23e32d39.tar.bz2 opensim-SC-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/Tests/Torture')
-rw-r--r-- | OpenSim/Tests/Torture/ObjectTortureTests.cs | 16 | ||||
-rw-r--r-- | OpenSim/Tests/Torture/ScriptTortureTests.cs | 2 |
2 files changed, 15 insertions, 3 deletions
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); |