Project

Profile

Help

-TP command line option doesn't give timings

Added by Anonymous over 19 years ago

Legacy ID: #2952584 Legacy Poster: Kevin Rodgers (notorious_kev)

http://saxonica.com/documentation/using-xsl/commandline.html says: -TP Run the stylesheet using the TraceListener TimedTraceListener. This creates an output file giving timings for each instruction executed. This output file can subsequently be analyzed to give an execution time profile for the stylesheet. See Performance Analysis below. And http://saxonica.com/documentation/using-xsl/performanceanalysis.html says: To run this tool, first execute the transformation with the -TP option, which sends timed tracing information to the standard error output file: java -jar dir/saxon7.jar -TP source stylesheet 2>profile.xml But there is no timing information in the profile.xml file. I don't want a trace of every time an instruction was executed on my extremely large XML file. What I want is a summary, with 1 line per instruction, listing the number of times it was called, the total time spent in those calls, and the average time per call. That would really be useful for performance tuning. -- Kevin


Replies (3)

Please register to reply

RE: -TP command line option doesn't give timings - Added by Anonymous over 19 years ago

Legacy ID: #2952595 Legacy Poster: Darren Hayduk (dhayduk)

Keep reading - "Then run another transformation to create a profile report from the output of this tracing tool: java -jar dir/saxon7.jar profile.xml timing-profile.xsl >profile.html Finally, view the resulting profile.html file in your browser." profile.html will have the summary info you are looking for.

RE: -TP command line option doesn't give timi - Added by Anonymous over 19 years ago

Legacy ID: #2952678 Legacy Poster: Kevin Rodgers (notorious_kev)

Yes, I did. But since there is no timing information in the profile.xml file, the profile.html table is empty (just 1 row of headers, no rows of data). And even that makes no sense -- shouldn't there at least be a row for each instruction with its count column even if the gross and net/total and average time columns are all zero?

RE: -TP command line option doesn't give timi - Added by Anonymous over 19 years ago

Legacy ID: #2956486 Legacy Poster: Kevin Rodgers (notorious_kev)

I should have been more explicit. Here's an excerpt from the profile.xml file, which shows that the XSL instructions are being traced but no timing information is being recorded: <xsl:apply-templates mode="std" line="38" module="mb3extract2redstone.xsl"> <source node="/ihs_extract/document[1]" line="6" file="SMFFC-0500.1.xml"> <xsl:text line="52" module="mb3extract2redstone.xsl"> </xsl:text> <xsl:call-template name="data-element" line="54" module="mb3extract2redstone.xsl"> <xsl:variable name="tag" line="496" module="mb3extract2redstone.xsl"> </xsl:variable> <xsl:variable name="content" line="497" module="mb3extract2redstone.xsl"> </xsl:variable> <xsl:text line="498" module="mb3extract2redstone.xsl"> </xsl:text> <xsl:value-of select="$tag" line="499" module="mb3extract2redstone.xsl"> </xsl:value-of> <xsl:text line="500" module="mb3extract2redstone.xsl"> </xsl:text> <xsl:value-of select="$content" line="501" module="mb3extract2redstone.xsl"> </xsl:value-of> <xsl:text line="502" module="mb3extract2redstone.xsl"> </xsl:text> </xsl:call-template> Not surprisingly, the table in the resulting profile.html file is empty: <table border="border" cellpadding="10"> <thead> <tr> <th>file</th> <th>line</th> <th>instruction</th> <th>count</th> <th>average time (gross)</th> <th>total time (gross)</th> <th>average time (net)</th> <th>total time (net)</th> </tr> </thead> <tbody></tbody> </table> Does anyone know what might be causing such results? Thanks, -- Kevin

    (1-3/3)

    Please register to reply