aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs3
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs5
-rw-r--r--OpenSim/Tests/Torture/ObjectTortureTests.cs51
3 files changed, 44 insertions, 15 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
index 73131e6..f2d4399 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
@@ -139,7 +139,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
139 LSL_Key llGetLinkKey(int linknum); 139 LSL_Key llGetLinkKey(int linknum);
140 LSL_String llGetLinkName(int linknum); 140 LSL_String llGetLinkName(int linknum);
141 LSL_Integer llGetLinkNumber(); 141 LSL_Integer llGetLinkNumber();
142 LSL_List llGetLinkPrimitiveParams(int linknum, LSL_List rules); 142 LSL_Integer llGetLinkNumberOfSides(int link);
143 LSL_List llGetLinkPrimitiveParams(int linknum, LSL_List rules);
143 LSL_Integer llGetListEntryType(LSL_List src, int index); 144 LSL_Integer llGetListEntryType(LSL_List src, int index);
144 LSL_Integer llGetListLength(LSL_List src); 145 LSL_Integer llGetListLength(LSL_List src);
145 LSL_Vector llGetLocalPos(); 146 LSL_Vector llGetLocalPos();
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
index a27899f..fad6c35 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
@@ -551,6 +551,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
551 return m_LSL_Functions.llGetLinkNumber(); 551 return m_LSL_Functions.llGetLinkNumber();
552 } 552 }
553 553
554 public LSL_Integer llGetLinkNumberOfSides(int link)
555 {
556 return m_LSL_Functions.llGetLinkNumberOfSides(link);
557 }
558
554 public LSL_Integer llGetListEntryType(LSL_List src, int index) 559 public LSL_Integer llGetListEntryType(LSL_List src, int index)
555 { 560 {
556 return m_LSL_Functions.llGetListEntryType(src, index); 561 return m_LSL_Functions.llGetListEntryType(src, index);
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