aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie2012-02-03 00:07:23 +0000
committerMelanie2012-02-03 00:07:23 +0000
commit76a658324cb2752e050c5593761e270d26c5a5e4 (patch)
tree1baaab8273ad8f2b68860b464067ee773031a96e
parentFix test failure (diff)
parentD'oh - we want to call llGetLinkNumberOfSides() in the LSL_Stub, not llGetLin... (diff)
downloadopensim-SC_OLD-76a658324cb2752e050c5593761e270d26c5a5e4.zip
opensim-SC_OLD-76a658324cb2752e050c5593761e270d26c5a5e4.tar.gz
opensim-SC_OLD-76a658324cb2752e050c5593761e270d26c5a5e4.tar.bz2
opensim-SC_OLD-76a658324cb2752e050c5593761e270d26c5a5e4.tar.xz
Merge branch 'master' of melanie@opensimulator.org:/var/git/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 b66537f..6106a65 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
@@ -138,7 +138,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
138 LSL_Key llGetLinkKey(int linknum); 138 LSL_Key llGetLinkKey(int linknum);
139 LSL_String llGetLinkName(int linknum); 139 LSL_String llGetLinkName(int linknum);
140 LSL_Integer llGetLinkNumber(); 140 LSL_Integer llGetLinkNumber();
141 LSL_List llGetLinkPrimitiveParams(int linknum, LSL_List rules); 141 LSL_Integer llGetLinkNumberOfSides(int link);
142 LSL_List llGetLinkPrimitiveParams(int linknum, LSL_List rules);
142 LSL_Integer llGetListEntryType(LSL_List src, int index); 143 LSL_Integer llGetListEntryType(LSL_List src, int index);
143 LSL_Integer llGetListLength(LSL_List src); 144 LSL_Integer llGetListLength(LSL_List src);
144 LSL_Vector llGetLocalPos(); 145 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 840d3a4..83550a5 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
@@ -539,6 +539,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
539 return m_LSL_Functions.llGetLinkNumber(); 539 return m_LSL_Functions.llGetLinkNumber();
540 } 540 }
541 541
542 public LSL_Integer llGetLinkNumberOfSides(int link)
543 {
544 return m_LSL_Functions.llGetLinkNumberOfSides(link);
545 }
546
542 public LSL_Integer llGetListEntryType(LSL_List src, int index) 547 public LSL_Integer llGetListEntryType(LSL_List src, int index)
543 { 548 {
544 return m_LSL_Functions.llGetListEntryType(src, index); 549 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