views:

86

answers:

1

How would you approach benchmarking the following XSL:T process.

Testing environment: a Linux server running apache, php, and mysql that is only visible behind our network: (It is not outward facing, so It cannot be remotely accessed).

Note: I have considered using AB(Apache Benchmark), but I am open to anything that is available in a Linux environment.

Here is an example:

PHP pulls in data from sources, generates XML, sends that through an XSL:T, which outputs XHTML.

I am interested in comparing processor and memory usage vs:

  1. php directly generating the same xhtml.
  2. a single php->xml->xsl:t->xhtml translation.
  3. concurrent translations like php->xml->xsl:t->xml->xsl:t->xhtml

I also plan to benchmark opcode caching, output compression, and maybe a few php accelerators, so the methods you would use should also be flexible enough to handle these cases as well.

I would also be interested in any known benchmarking for something similar.

A: 

In general, adding some steps should increase processing time. I suppose the solution "PHP that generates XMTML" will be faster than the other alternatives.

Therefore, to answer your question, I would consider what may increase your productivity: Is it easier to generate a simple XML stream from PHP, processing it with XSLT to XHTML? Is it simpler to apply various XSLT templates? Or again, if you're a PHP god you can generate direct XHTML (which is an XML file) and you do not care about the templating that XSLT adds? Have you considered that the XML->XHTML can be done by the client browser?

0x6adb015
I appreciate the answer but I am only interested in methods to benchmark the process. I am aware of what methods should be directly faster. I don't mean that to sound bad, as I do appreciate your response.
merlincam