[jboss-svn-commits] JBL Code SVN: r31087 - labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/resources/xsl.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Thu Jan 14 08:45:44 EST 2010
Author: whitingjr
Date: 2010-01-14 08:45:44 -0500 (Thu, 14 Jan 2010)
New Revision: 31087
Added:
labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/resources/xsl/agregate.xsl
Log:
Added new stylesheet to agregate the metrics.
Added: labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/resources/xsl/agregate.xsl
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/resources/xsl/agregate.xsl (rev 0)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/resources/xsl/agregate.xsl 2010-01-14 13:45:44 UTC (rev 31087)
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:param name="hibernate">org.hibernate</xsl:param>
+ <xsl:param name="arjuna">com.arjuna</xsl:param>
+ <xsl:param name="caveat-emptor">auction</xsl:param>
+ <xsl:param name="jboss">org.jboss</xsl:param>
+ <xsl:param name="log4j">org.apache.log4j</xsl:param>
+
+ <xsl:template match="/">
+ <xsl:apply-templates select="/*"/>
+ </xsl:template>
+ <xsl:template match="analysis">
+ <xsl:copy>
+ <xsl:apply-templates/>
+ </xsl:copy>
+ </xsl:template>
+ <xsl:template match="summary-analysis">
+ <xsl:copy>
+ <xsl:copy-of select="./category-0"/>
+ <xsl:apply-templates select="./category-A"/>
+ <xsl:copy-of select="./category-B"/>
+ <xsl:copy-of select="./category-C"/>
+ <xsl:copy-of select="./category-D"/>
+ </xsl:copy>
+ </xsl:template>
+ <xsl:template match="category-A">
+ <!-- context node: category-A -->
+
+ <xsl:variable name="category0"
+ select="/analysis/summary-analysis/category-0" />
+ <xsl:variable name="categoryB"
+ select="/analysis/summary-analysis/category-B" />
+ <xsl:variable name="categoryC"
+ select="/analysis/summary-analysis/category-C" />
+ <xsl:variable name="categoryD"
+ select="/analysis/summary-analysis/category-D" />
+
+ <xsl:copy>
+ <xsl:element name="frame">
+ <xsl:copy-of select="./frame/methodDuration"/>
+
+ <xsl:element name="everything.else">
+ <xsl:element name="{string($hibernate)}">
+ <xsl:value-of select="preceding::*/frame/*/org.hibernate - sum(following::*/frame/*/org.hibernate)"/>
+ </xsl:element>
+ <xsl:element name="{string($arjuna)}">
+ <xsl:value-of select="preceding::*/frame/*/com.arjuna - sum(following::*/frame/*/com.arjuna)"/>
+ </xsl:element>
+ <xsl:element name="{string($caveat-emptor)}">
+ <xsl:value-of select="preceding::*/frame/*/auction - sum(following::*/frame/*/auction)"/>
+ </xsl:element>
+ <xsl:element name="{string($jboss)}">
+ <xsl:value-of select="preceding::*/frame/*/org.jboss - sum(following::*/frame/*/org.jboss)"/>
+ </xsl:element>
+ <xsl:element name="{string($log4j)}">
+ <xsl:value-of select="preceding::*/frame/*/org.apache.log4j - sum(following::*/frame/*/org.apache.log4j)"/>
+ </xsl:element>
+ <!-- This uses Ant to escape these package paths. -->
+ <xsl:element name="${db-vendor-package.xpath.A}">
+ <xsl:value-of select="preceding::*/frame/*/${db-vendor-package.xpath.A} - sum(following::*/frame/*/${db-vendor-package.xpath.A})"/>
+ </xsl:element>
+ <!--
+ <xsl:choose>
+
+ </xsl:choose>
+ -->
+ </xsl:element>
+ </xsl:element>
+ </xsl:copy>
+ </xsl:template>
+
+</xsl:stylesheet>
More information about the jboss-svn-commits
mailing list