Weblog » Stress testing Porcupine v0.6
Before releasing Porcupine v0.6 I have conducted a series of stress tests using Pylot. The aim of one of these stress tests was to benchmark Porcupine under extreme race conditions.
For this reason I created a test scenario with only two requests. The first request authenticates the "admin" user against the Porcupine database whereas the second request calls a remote web method that creates a common container object (folder) inside the root container object.
The test scenario is the following:
<testcases>
<!-- login -->
<case>
<url>http://192.168.233.115/porcupine.py/</url>
<method>POST</method>
<body><![CDATA[<?xml version="1.0"?>
<methodCall>
<methodName>login</methodName>
<params>
<param><value><string>admin</string></value></param>
<param><value><string>admin</string></value></param>
</params>
</methodCall>
]]></body>
<add_header>User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8</add_header>
<add_header>Content-type: text/xml</add_header>
</case>
<!-- create object -->
<case>
<url>http://192.168.233.115/porcupine.py/</url>
<method>POST</method>
<body><![CDATA[<?xml version="1.0"?>
<methodCall>
<methodName>create_object</methodName>
<params></params>
</methodCall>
]]></body>
<add_header>User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8</add_header>
<add_header>Content-type: text/xml</add_header>
</case>
</testcases>
from porcupine.utils import misc
from org.innoscript.desktop.schema.common import Folder
@webmethods.remotemethod(of_type=RootFolder)
@db.transactional(auto_commit=True)
def create_object(self):
f = Folder()
f.displayName.value = misc.generate_oid()
f.append_to('')
return True
$ python run.py -a 100 -d 1200 -i 80 -r 100 -x porcupine_txn_test.xml -o results -n "Porcupine 0.6 Performance Results"
The machine used for the test was a virtual ESX server with dual core processor and Ubuntu installed.
The detailed results can be found here.