git-cpan-module: SOAP-WSDL git-cpan-version: 2.00.02 git-cpan-authorid: MKUTTER git-cpan-file: authors/id/M/MK/MKUTTER/SOAP-WSDL-2.00.02.tar.gz
78 lines
2.9 KiB
Plaintext
78 lines
2.9 KiB
Plaintext
The benchmark directory includes a bunch of benchmarks. The most notable
|
|
ones are listed below.
|
|
|
|
Comparison benchmarks for SOAP::Lite, SOAP::WSDL, SOAP::WSDL_XS, and
|
|
XML::Compile::WSDP need all of these installed for the benchmark to
|
|
work (building and adding to the lib path suffices). All comparison benchmarks
|
|
only account for the client part of the respective modules - the server part
|
|
is not benchmarked.
|
|
|
|
SOAP::WSDL_XS can be obtained from the project's subversion repository at
|
|
|
|
https://soap-wsdl.svn.sourceforge.net/svnroot/SOAP-WSDL/SOAP-WSDL_XS/trunk
|
|
|
|
Some benchmarks expect to find the SOAP servers "cgi-bin/person.pl" and
|
|
"cgi-bin/hello.pl" from the examples directory at
|
|
http://localhost:81/soap-wsdl-test/person.pl and
|
|
http://localhost:81/soap-wsdl-test/hello.pl
|
|
|
|
If the web services are not set up properly, you're benchmarking error
|
|
creation times.
|
|
|
|
To set up a SOAP server using apache, add the following to your apache config:
|
|
|
|
# usually in main config
|
|
Listen 127.0.0.1:81
|
|
|
|
# maybe in a
|
|
#<VirtualHost 127.0.0.1:81> container
|
|
#
|
|
ScriptAlias /soap-wsdl-test/ /PATH_TO/SOAP-WSDL/example/cgi-bin/
|
|
<Directory "/PATH_TO/SOAP-WSDL/example/cgi-bin">
|
|
AllowOverride None
|
|
Order allow,deny
|
|
Allow from all
|
|
</Directory>
|
|
|
|
Using mod_perl is highly recommended to cut down benchmarking time.
|
|
|
|
COMPARISON BENCHMARKS
|
|
=====================
|
|
|
|
01_expat.t
|
|
----------
|
|
Benchmarks XML parsing speed between XML::Simple with XML::Parser as backend,
|
|
SOAP::Lite, SOAP::WSDL outputting objects, SOAP::WSDL outputting hash refs,
|
|
XML::LibXML with a simple DOM walker outputting hash refs, XML::LibXML
|
|
outputting the DOM and SOAP::WSDL_XS.
|
|
|
|
No web server required.
|
|
|
|
This benchmark sheds light on how much performance is - in theory - reachable
|
|
by each approach: The XML::LibXML (Hash) benchmark converts the DOM into
|
|
a nested hash using a recursive function. This is - basically - how
|
|
XML::Compile works. XML::Simple uses XML::Parser's streaming
|
|
API. SOAP::WSDL uses XML::Parser::Expat, XML::Parser's low-level backend,
|
|
to create objects or - in the (Hash) variant - nested hashes similar to
|
|
those created by XML::Simple.
|
|
SOAP::WSDL_XS uses a libexpat-based XS parser to create perl objects, and
|
|
XML::LibXML (DOM) creates a C level libxml2 DOM accessible from perl.
|
|
|
|
person.pl:
|
|
----------
|
|
Sends a empty requests and receives a response of ca. 10kB.
|
|
Modeled after a common enterprise setup: "Give me a list of person data sets".
|
|
|
|
For this benchmark, XML parsing speed is important. XML generation speed is
|
|
only weighted in the last two runs, and weights around 1/10 of parsing speed.
|
|
|
|
hello.pl:
|
|
---------
|
|
Sends a request containing name and given name and politely replies
|
|
"Hello <given name> <name>".
|
|
An example for very short requests and responses.
|
|
|
|
For this example, handling and generating small requests/responses, and
|
|
transport speed is important. As the XML transmitted is relatively small, the
|
|
transport layer's overhead is important.
|