aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tests
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Tests/Torture/ObjectTortureTests.cs51
1 files changed, 37 insertions, 14 deletions
diff --git a/OpenSim/Tests/Torture/ObjectTortureTests.cs b/OpenSim/Tests/Torture/ObjectTortureTests.cs
index cdbaa66..b9764d7 100644
--- a/OpenSim/Tests/Torture/ObjectTortureTests.cs
+++ b/OpenSim/Tests/Torture/ObjectTortureTests.cs
@@ -59,33 +59,60 @@ namespace OpenSim.Tests.Torture
59// } 59// }
60 60
61 [Test] 61 [Test]
62 public void Test0001TenThousandObjects() 62 public void Test0001_10K_1PrimObjects()
63 { 63 {
64 TestHelpers.InMethod(); 64 TestHelpers.InMethod();
65// log4net.Config.XmlConfigurator.Configure(); 65// log4net.Config.XmlConfigurator.Configure();
66 66
67 TestAddObjects(10000); 67 TestAddObjects(1, 10000);
68 } 68 }
69 69
70 [Test] 70 [Test]
71 public void Test0002OneHundredThousandObjects() 71 public void Test0002_100K_1PrimObjects()
72 { 72 {
73 TestHelpers.InMethod(); 73 TestHelpers.InMethod();
74// log4net.Config.XmlConfigurator.Configure(); 74// log4net.Config.XmlConfigurator.Configure();
75 75
76 TestAddObjects(100000); 76 TestAddObjects(1, 100000);
77 } 77 }
78 78
79 [Test] 79 [Test]
80 public void Test0003TwoHundredThousandObjects() 80 public void Test0003_200K_1PrimObjects()
81 { 81 {
82 TestHelpers.InMethod(); 82 TestHelpers.InMethod();
83// log4net.Config.XmlConfigurator.Configure(); 83// log4net.Config.XmlConfigurator.Configure();
84 84
85 TestAddObjects(200000); 85 TestAddObjects(1, 200000);
86 } 86 }
87 87
88 private void TestAddObjects(int objectsToAdd) 88 [Test]
89 public void Test0011_100_100PrimObjects()
90 {
91 TestHelpers.InMethod();
92// log4net.Config.XmlConfigurator.Configure();
93
94 TestAddObjects(100, 100);
95 }
96
97 [Test]
98 public void Test0012_1K_100PrimObjects()
99 {
100 TestHelpers.InMethod();
101// log4net.Config.XmlConfigurator.Configure();
102
103 TestAddObjects(100, 1000);
104 }
105
106 [Test]
107 public void Test0013_2K_100PrimObjects()
108 {
109 TestHelpers.InMethod();
110// log4net.Config.XmlConfigurator.Configure();
111
112 TestAddObjects(100, 2000);
113 }
114
115 private void TestAddObjects(int primsInEachObject, int objectsToAdd)
89 { 116 {
90 UUID ownerId = new UUID("F0000000-0000-0000-0000-000000000000"); 117 UUID ownerId = new UUID("F0000000-0000-0000-0000-000000000000");
91 118
@@ -98,7 +125,7 @@ namespace OpenSim.Tests.Torture
98 125
99 for (int i = 1; i <= objectsToAdd; i++) 126 for (int i = 1; i <= objectsToAdd; i++)
100 { 127 {
101 SceneObjectGroup so = SceneHelpers.CreateSceneObject(1, ownerId, "part_", i); 128 SceneObjectGroup so = SceneHelpers.CreateSceneObject(primsInEachObject, ownerId, "part_", i);
102 Assert.That(scene.AddNewSceneObject(so, false), Is.True, string.Format("Object {0} was not created", i)); 129 Assert.That(scene.AddNewSceneObject(so, false), Is.True, string.Format("Object {0} was not created", i));
103 } 130 }
104 131
@@ -114,13 +141,9 @@ namespace OpenSim.Tests.Torture
114 string.Format("Object {0} could not be retrieved", i)); 141 string.Format("Object {0} could not be retrieved", i));
115 } 142 }
116 143
117// Console.WriteLine(
118// "Took {0}ms, {1}MB to create {2} single prim scene objects",
119// elapsed.Milliseconds, processGcAlloc / 1024 / 1024, objectsToAdd);
120
121 Console.WriteLine( 144 Console.WriteLine(
122 "Took {0}MB to create {1} single prim scene objects", 145 "Took {0}ms, {1}MB to create {2} objects each containing {3} prim(s)",
123 processGcAlloc / 1024 / 1024, objectsToAdd); 146 Math.Round(elapsed.TotalMilliseconds), processGcAlloc / 1024 / 1024, objectsToAdd, primsInEachObject);
124 } 147 }
125 } 148 }
126} \ No newline at end of file 149} \ No newline at end of file