aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Sommerseth <davids@redhat.com>2012-12-05 18:40:59 +0100
committerDavid Sommerseth <davids@redhat.com>2012-12-05 18:40:59 +0100
commitff9ad86abf96544364ed07667b0387a0b0e1d8d5 (patch)
tree5cfe2fee0c922d87b250b054bc6a5231003d2e76
parent915060a6d7a4946e389bf0d07b23e66c44248e28 (diff)
downloadrteval-ff9ad86abf96544364ed07667b0387a0b0e1d8d5.tar.gz
Updated summary and histogram XSLT templates
Updated the templates to work with the newer summary.xml format introduced by the measurements profile patches. Signed-off-by: David Sommerseth <davids@redhat.com>
-rw-r--r--rteval/rteval_histogram_raw.xsl12
-rw-r--r--rteval/rteval_text.xsl83
2 files changed, 58 insertions, 37 deletions
diff --git a/rteval/rteval_histogram_raw.xsl b/rteval/rteval_histogram_raw.xsl
index 69399bc..9aadcc3 100644
--- a/rteval/rteval_histogram_raw.xsl
+++ b/rteval/rteval_histogram_raw.xsl
@@ -10,15 +10,15 @@
<xsl:text>core&#09;index&#09;value&#10;</xsl:text>
<!-- Extract overall system histogram data -->
- <xsl:apply-templates select="cyclictest/system/histogram/bucket">
+ <xsl:apply-templates select="Measurements/Profile/cyclictest/system/histogram/bucket">
<xsl:with-param name="label" select="'system'"/>
- <xsl:sort select="cyclictest/core/histogram/bucket/@index" data-type="number"/>
+ <xsl:sort select="Measurements/Profile/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 select="Measurements/Profile/cyclictest/core/histogram/bucket">
+ <xsl:sort select="Measurements/Profile/cyclictest/core/@id" data-type="number"/>
+ <xsl:sort select="Measurements/Profile/cyclictest/core/histogram/bucket/@index" data-type="number"/>
</xsl:apply-templates>
</xsl:template>
<!-- -->
@@ -26,7 +26,7 @@
<!-- -->
<!-- Record formatting -->
- <xsl:template match="cyclictest/system/histogram/bucket|cyclictest/core/histogram/bucket">
+ <xsl:template match="/rteval/Measurements/Profile/cyclictest/*/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 -->
diff --git a/rteval/rteval_text.xsl b/rteval/rteval_text.xsl
index 8349167..8725d74 100644
--- a/rteval/rteval_text.xsl
+++ b/rteval/rteval_text.xsl
@@ -136,14 +136,8 @@
<xsl:apply-templates select="loads/command_line"/>
</xsl:if>
<xsl:text>&#10;</xsl:text>
-
- <!-- Format other sections of the report, if they are found -->
- <!-- To add support for even more sections, just add them into the existing -->
- <!-- xsl:apply-tempaltes tag, separated with pipe(|) -->
- <!-- -->
- <!-- select="cyclictest|new_foo_section|another_section" -->
- <!-- -->
- <xsl:apply-templates select="cyclictest|hwlatdetect[@format='1.0']"/>
+ <!-- Generate a summary report for all measurement profiles -->
+ <xsl:apply-templates select="Measurements/Profile"/>
<xsl:text> ===================================================================&#10;</xsl:text>
</xsl:template>
<!-- -->
@@ -166,19 +160,46 @@
</xsl:template>
+ <xsl:template match="/rteval/Measurements/Profile">
+ <xsl:text> Measurement profile </xsl:text>
+ <xsl:value-of select="position()"/><xsl:text>: </xsl:text>
+ <xsl:choose>
+ <xsl:when test="@loads = '1'"><xsl:text>With loads, </xsl:text></xsl:when>
+ <xsl:otherwise><xsl:text>Without loads, </xsl:text></xsl:otherwise>
+ </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="@parallel = '1'">
+ <xsl:text>measurements in parallel</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>measurements serialised</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:text>&#10;</xsl:text>
+
+ <!-- Format other sections of the report, if they are found -->
+ <!-- To add support for even more sections, just add them into the existing -->
+ <!-- xsl:apply-tempaltes tag, separated with pipe(|) -->
+ <!-- -->
+ <!-- select="cyclictest|new_foo_section|another_section" -->
+ <!-- -->
+ <xsl:apply-templates select="cyclictest|hwlatdetect[@format='1.0']"/>
+ <xsl:text>&#10;</xsl:text>
+ </xsl:template>
+
<!-- Format the cyclic test section of the report -->
- <xsl:template match="/rteval/cyclictest">
- <xsl:text> Latency test&#10;</xsl:text>
+ <xsl:template match="/rteval/Measurements/Profile/cyclictest">
+ <xsl:text> Latency test&#10;</xsl:text>
- <xsl:text> Command:</xsl:text>
- <xsl:value-of select="command_line"/>
+ <xsl:text> Command: </xsl:text>
+ <xsl:value-of select="@command_line"/>
<xsl:text>&#10;&#10;</xsl:text>
- <xsl:text> System: </xsl:text>
+ <xsl:text> System: </xsl:text>
<xsl:value-of select="system/@description"/>
<xsl:text>&#10;</xsl:text>
- <xsl:text> Statistics: &#10;</xsl:text>
+ <xsl:text> Statistics: &#10;</xsl:text>
<xsl:apply-templates select="system/statistics"/>
<!-- Add CPU core info and stats-->
@@ -189,65 +210,65 @@
<!-- Format the CPU core section in the cyclict test part -->
- <xsl:template match="cyclictest/core">
- <xsl:text> CPU core </xsl:text>
+ <xsl:template match="/rteval/Measurements/Profile/cyclictest/core">
+ <xsl:text> CPU core </xsl:text>
<xsl:value-of select="@id"/>
- <xsl:text> Priority: </xsl:text>
+ <xsl:text> Priority: </xsl:text>
<xsl:value-of select="@priority"/>
<xsl:text>&#10;</xsl:text>
- <xsl:text> Statistics: </xsl:text>
+ <xsl:text> Statistics: </xsl:text>
<xsl:text>&#10;</xsl:text>
<xsl:apply-templates select="statistics"/>
</xsl:template>
<!-- Generic formatting of statistics information -->
- <xsl:template match="statistics">
- <xsl:text> Samples: </xsl:text>
+ <xsl:template match="/rteval/Measurements/Profile/cyclictest/*/statistics">
+ <xsl:text> Samples: </xsl:text>
<xsl:value-of select="samples"/>
<xsl:text>&#10;</xsl:text>
- <xsl:text> Mean: </xsl:text>
+ <xsl:text> Mean: </xsl:text>
<xsl:value-of select="mean"/>
<xsl:value-of select="mean/@unit"/>
<xsl:text>&#10;</xsl:text>
- <xsl:text> Median: </xsl:text>
+ <xsl:text> Median: </xsl:text>
<xsl:value-of select="median"/>
<xsl:value-of select="median/@unit"/>
<xsl:text>&#10;</xsl:text>
- <xsl:text> Mode: </xsl:text>
+ <xsl:text> Mode: </xsl:text>
<xsl:value-of select="mode"/>
<xsl:value-of select="mode/@unit"/>
<xsl:text>&#10;</xsl:text>
- <xsl:text> Range: </xsl:text>
+ <xsl:text> Range: </xsl:text>
<xsl:value-of select="range"/>
<xsl:value-of select="range/@unit"/>
<xsl:text>&#10;</xsl:text>
- <xsl:text> Min: </xsl:text>
+ <xsl:text> Min: </xsl:text>
<xsl:value-of select="minimum"/>
<xsl:value-of select="minimum/@unit"/>
<xsl:text>&#10;</xsl:text>
- <xsl:text> Max: </xsl:text>
+ <xsl:text> Max: </xsl:text>
<xsl:value-of select="maximum"/>
<xsl:value-of select="maximum/@unit"/>
<xsl:text>&#10;</xsl:text>
- <xsl:text> Mean Absolute Dev: </xsl:text>
+ <xsl:text> Mean Absolute Dev: </xsl:text>
<xsl:value-of select="mean_absolute_deviation"/>
<xsl:value-of select="mean_absolute_deviation/@unit"/>
<xsl:text>&#10;</xsl:text>
- <xsl:text> Variance: </xsl:text>
+ <xsl:text> Variance: </xsl:text>
<xsl:value-of select="variance"/>
<xsl:value-of select="variance/@unit"/>
<xsl:text>&#10;</xsl:text>
- <xsl:text> Std.dev: </xsl:text>
+ <xsl:text> Std.dev: </xsl:text>
<xsl:value-of select="standard_deviation"/>
<xsl:value-of select="standard_deviation/@unit"/>
<xsl:text>&#10;&#10;</xsl:text>
@@ -256,7 +277,7 @@
<!-- Format the hwlatdetect test section of the report -->
- <xsl:template match="/rteval/hwlatdetect[@format='1.0']">
+ <xsl:template match="/rteval/Measurements/Profile/hwlatdetect[@format='1.0']">
<xsl:text> Hardware latency detector&#10;</xsl:text>
<xsl:text> Run duration: </xsl:text>
@@ -281,7 +302,7 @@
<xsl:apply-templates select="samples/sample"/>
</xsl:template>
- <xsl:template match="/rteval/hwlatdetect[@format='1.0']/samples/sample">
+ <xsl:template match="/rteval/Measurements/Profile/hwlatdetect[@format='1.0']/samples/sample">
<xsl:text> - @</xsl:text>
<xsl:value-of select="@timestamp"/>
<xsl:text> </xsl:text>