[jboss-svn-commits] JBL Code SVN: r32932 - labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/resources/xsl.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue May 18 05:35:41 EDT 2010


Author: whitingjr
Date: 2010-05-18 05:35:41 -0400 (Tue, 18 May 2010)
New Revision: 32932

Added:
   labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/resources/xsl/filter-results.xsl
   labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/resources/xsl/reduce-text.xsl
   labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/resources/xsl/to-csv.xsl
Log:
Added stylesheets.


Added: labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/resources/xsl/filter-results.xsl
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/resources/xsl/filter-results.xsl	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/resources/xsl/filter-results.xsl	2010-05-18 09:35:41 UTC (rev 32932)
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+   xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+   <xsl:param name="category0-method" /><!-- test case -->
+   <xsl:param name="categoryB-method" /><!-- read, [write] -->
+   <xsl:param name="categoryC-method" /><!-- read, [write] -->
+   <xsl:param name="categoryD-method" /><!-- Commit -->
+   <xsl:param name="methods-csv" />
+   <xsl:key use="@mn" name="frame-mn-withchildren" match="//frame[0!=count(child::frame)]"/>
+   <xsl:key use="@mn" name="frame-mn" match="//frame"/>
+
+   <xsl:template match="/">
+      <xsl:apply-templates />
+   </xsl:template>
+
+   <xsl:template match="profile">
+      <xsl:copy>
+         <xsl:call-template name="parse-csv">
+            <xsl:with-param name="csv" select="$methods-csv"></xsl:with-param>
+         </xsl:call-template>
+      </xsl:copy>
+   </xsl:template>
+   
+   <xsl:template name="parse-csv">
+      <xsl:param name="csv"/>
+      <xsl:choose>
+         <xsl:when test="contains($csv, ',')">
+            <xsl:call-template name="generate-method-frame">
+               <xsl:with-param name="class-and-method-name" select="substring-before($csv, ',')"/>
+            </xsl:call-template>
+            <xsl:call-template name="parse-csv">
+               <xsl:with-param name="csv" select="substring-after($csv, ',')"/>
+            </xsl:call-template>
+         </xsl:when>
+         <xsl:otherwise>
+            <xsl:call-template name="generate-method-frame">
+               <xsl:with-param name="class-and-method-name" select="$csv"/>
+            </xsl:call-template>
+         </xsl:otherwise>
+      </xsl:choose>
+   </xsl:template>
+   
+   <xsl:template name="generate-method-frame">
+      <xsl:param name="class-and-method-name"></xsl:param>
+      <xsl:element name="frame">
+         <xsl:attribute name="mn"><xsl:value-of select="$class-and-method-name"/> </xsl:attribute>
+         <xsl:attribute name="c"><xsl:value-of select="count(key('frame-mn', $class-and-method-name))"/></xsl:attribute>
+         <xsl:attribute name="t"><xsl:value-of select="sum(key('frame-mn', $class-and-method-name)/@t)"/></xsl:attribute>
+      </xsl:element>
+   </xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file

Added: labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/resources/xsl/reduce-text.xsl
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/resources/xsl/reduce-text.xsl	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/resources/xsl/reduce-text.xsl	2010-05-18 09:35:41 UTC (rev 32932)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+   xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+   <xsl:param name="category0-method" /><!-- test case -->
+   <xsl:param name="categoryB-method" /><!-- read, [write] -->
+   <xsl:param name="categoryC-method" /><!-- read, [write] -->
+   <xsl:param name="categoryD-method" /><!-- Commit -->
+   <xsl:param name="methods-csv" />
+   <xsl:key use="@mn" name="frame-mn-withchildren" match="//frame[0!=count(child::frame)]"/>
+   <xsl:key use="@mn" name="frame-mn" match="//frame"/>
+
+   <xsl:template match="/">
+      <xsl:apply-templates />
+   </xsl:template>
+
+   <xsl:template match="profile|thread|interaction">
+      <xsl:copy>
+         <xsl:apply-templates/>
+      </xsl:copy>
+   </xsl:template>
+   
+   <xsl:template match="frame">
+      <xsl:element name="{name()}">
+         <xsl:attribute name="mn"><xsl:value-of select="substring-after(substring-before(@mn, ':'), '.')"/><xsl:text>:</xsl:text><xsl:value-of select="substring-after(@mn, ':')"></xsl:value-of></xsl:attribute>
+         <xsl:copy-of select="@c"/>
+         <xsl:copy-of select="@t"/>
+         <xsl:apply-templates/>
+      </xsl:element>
+   </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file

Added: labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/resources/xsl/to-csv.xsl
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/resources/xsl/to-csv.xsl	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/resources/xsl/to-csv.xsl	2010-05-18 09:35:41 UTC (rev 32932)
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+   xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+      <xsl:output omit-xml-declaration="yes" method="text" encoding="UTF-8" />
+   
+   <xsl:param name="category0-method" /><!-- test case -->
+   <xsl:param name="categoryB-method" /><!-- read, [write] -->
+   <xsl:param name="categoryC-method" /><!-- read, [write] -->
+   <xsl:param name="categoryD-method" /><!-- Commit -->
+   <xsl:param name="methods-csv" />
+   <xsl:key use="@mn" name="frame-mn-withchildren" match="//frame[0!=count(child::frame)]"/>
+   <xsl:key use="@mn" name="frame-mn" match="//frame"/>
+
+   <xsl:template match="/">
+      <xsl:apply-templates />
+   </xsl:template>
+
+   <xsl:template match="profile">
+      <xsl:text>category,gross-average,arjuna,db-vendor</xsl:text>
+<xsl:text>
+</xsl:text>
+      <xsl:text>category-0,</xsl:text>
+      <xsl:value-of select="round(./frame['org.jboss.jbossts.performance.resource.SynchronizeTask:task']/@t div ./frame['org.jboss.jbossts.performance.resource.SynchronizeTask:task']/@c)"/>
+      <xsl:text>,</xsl:text>
+      <xsl:value-of select="round(./frame['com.arjuna.ats.internal.arjuna.objectstore.FileSystemStore:write_committed']/@t div ./frame['com.arjuna.ats.internal.arjuna.objectstore.FileSystemStore:write_committed']/@c)"/>
+      <xsl:text>,</xsl:text>
+      <xsl:value-of select="round((./frame['org.jboss.resource.adapter.jdbc.WrappedPreparedStatement:executeQuery']/@t div ./frame['org.jboss.resource.adapter.jdbc.WrappedPreparedStatement:executeQuery']/@c) + (./frame['org.jboss.resource.adapter.jdbc.WrappedPreparedStatement:executeUpdate']/@t div ./frame['org.jboss.resource.adapter.jdbc.WrappedPreparedStatement:executeUpdate']/@c))"/>
+<xsl:text>
+</xsl:text>
+      <xsl:text>category-A,</xsl:text>
+      <xsl:text>,</xsl:text>
+      <xsl:text>,</xsl:text>
+<xsl:text>
+</xsl:text>
+      <xsl:text>category-B,</xsl:text>
+      <xsl:value-of select="round((./frame['org.jboss.jbossts.performance.resource.SynchronizeTask:findUsingResourceA']/@t div ./frame['org.jboss.jbossts.performance.resource.SynchronizeTask:findUsingResourceA']/@c))"/>
+      <xsl:text>,</xsl:text>
+      <xsl:text>,</xsl:text>
+<xsl:text>
+</xsl:text>
+      <xsl:text>category-B,</xsl:text>
+      <xsl:value-of select="round( (./frame['org.hibernate.impl.SessionImpl:managedFlush']/@t div ./frame['org.hibernate.impl.SessionImpl:managedFlush']/@c))"/>
+      <xsl:text>,</xsl:text>
+      <xsl:text>,</xsl:text>
+<xsl:text>
+</xsl:text>
+      <xsl:text>category-C,</xsl:text>
+      <xsl:value-of select="round((./frame['org.jboss.jbossts.performance.resource.SynchronizeTask:findUsingResourceB']/@t div ./frame['org.jboss.jbossts.performance.resource.SynchronizeTask:findUsingResourceB']/@c) )"/>
+      <xsl:text>,</xsl:text>
+      <xsl:text>,</xsl:text>
+<xsl:text>
+</xsl:text>
+      <xsl:text>category-C,</xsl:text>
+      <xsl:value-of select="round((./frame['org.jboss.jbossts.performance.synchronization.SessionSynchronization:beforeCompletion']/@t div ./frame['org.jboss.jbossts.performance.synchronization.SessionSynchronization:beforeCompletion']/@c))"/>
+      <xsl:text>,</xsl:text>
+      <xsl:text>,</xsl:text>
+<xsl:text>
+</xsl:text>
+      <xsl:text>category-D,</xsl:text>
+      <xsl:value-of select="round((./frame['com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction:commit']/@t div ./frame['com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction:commit']/@c))"/>
+      <xsl:text>,</xsl:text>
+      <xsl:text>,</xsl:text>
+<xsl:text>
+</xsl:text>
+   </xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file



More information about the jboss-svn-commits mailing list