summaryrefslogtreecommitdiffstats
path: root/rteval/rteval_histogram_raw.xsl
diff options
context:
space:
mode:
authorDavid Sommerseth <davids@redhat.com>2009-10-29 18:26:13 +0100
committerDavid Sommerseth <davids@redhat.com>2009-10-29 18:26:13 +0100
commit5796dca87e637e1b1165a48eba9a9b28472e654a (patch)
tree2de997dc1f3c308a13e09521ee48138925835022 /rteval/rteval_histogram_raw.xsl
parentfab4dd816f76022bf25ea4f63889778ede1b7364 (diff)
downloadrteval-5796dca87e637e1b1165a48eba9a9b28472e654a.tar.gz
rteval-5796dca87e637e1b1165a48eba9a9b28472e654a.tar.xz
rteval-5796dca87e637e1b1165a48eba9a9b28472e654a.zip
New feature: rteval <-H | --raw-histogram>
A variant of -Z|--summarize, but it uses another XSLT template to generate a raw text formated version of the histogram data
Diffstat (limited to 'rteval/rteval_histogram_raw.xsl')
-rw-r--r--rteval/rteval_histogram_raw.xsl45
1 files changed, 45 insertions, 0 deletions
diff --git a/rteval/rteval_histogram_raw.xsl b/rteval/rteval_histogram_raw.xsl
new file mode 100644
index 0000000..69399bc
--- /dev/null
+++ b/rteval/rteval_histogram_raw.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:output method="text" version="1.0" encoding="UTF-8" indent="no"/>
+
+ <!-- -->
+ <!-- Main report framework -->
+ <!-- -->
+ <xsl:template match="/rteval">
+ <!-- Heading -->
+ <xsl:text>core&#09;index&#09;value&#10;</xsl:text>
+
+ <!-- Extract overall system histogram data -->
+ <xsl:apply-templates select="cyclictest/system/histogram/bucket">
+ <xsl:with-param name="label" select="'system'"/>
+ <xsl:sort select="cyclictest/core/histogram/bucket/@index" data-type="number"/>
+ </xsl:apply-templates>
+
+ <!-- Extract per cpu core histogram data -->
+ <xsl:apply-templates select="cyclictest/core/histogram/bucket">
+ <xsl:sort select="cyclictest/core/@id" data-type="number"/>
+ <xsl:sort select="cyclictest/core/histogram/bucket/@index" data-type="number"/>
+ </xsl:apply-templates>
+ </xsl:template>
+ <!-- -->
+ <!-- End of main report framework -->
+ <!-- -->
+
+ <!-- Record formatting -->
+ <xsl:template match="cyclictest/system/histogram/bucket|cyclictest/core/histogram/bucket">
+ <xsl:param name="label"/>
+ <xsl:choose>
+ <!-- If we don't have a id tag in what should be a 'core' tag, use the given label -->
+ <xsl:when test="../../@id"><xsl:value-of select="../../@id"/></xsl:when>
+ <xsl:otherwise><xsl:value-of select="$label"/></xsl:otherwise>
+ </xsl:choose>
+ <xsl:text>&#09;</xsl:text>
+
+ <xsl:value-of select="@index"/>
+ <xsl:text>&#09;</xsl:text>
+
+ <xsl:value-of select="@value"/>
+ <xsl:text>&#10;</xsl:text>
+ </xsl:template>
+
+</xsl:stylesheet>