rteval/rteval-Generate-raw-histogram-data-for-an-existing-t.patch
John Kacur 5c0cb5038a Add timerlat as a measurement module
Add timerlat as a measurement module

Resolves:RHEL-8682
Signed-off-by: John Kacur <jkacur@redhat.com>
2024-05-06 15:51:18 -04:00

70 lines
2.8 KiB
Diff

From 843ff713340ab701aa8859ca8b3d8a776608175c Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
Date: Mon, 29 Apr 2024 10:47:41 -0400
Subject: [PATCH 09/13] rteval: Generate raw histogram data for an existing
timerlat report
Generate raw histogram data for an existing timerlat report.
Signed-off-by: John Kacur <jkacur@redhat.com>
---
rteval/rteval_histogram_raw.xsl | 29 ++++++++++++++++++++++++++++-
1 file changed, 28 insertions(+), 1 deletion(-)
diff --git a/rteval/rteval_histogram_raw.xsl b/rteval/rteval_histogram_raw.xsl
index 038419bf03b7..00b2be34f305 100644
--- a/rteval/rteval_histogram_raw.xsl
+++ b/rteval/rteval_histogram_raw.xsl
@@ -12,15 +12,26 @@
<!-- Extract overall system histogram data -->
<xsl:apply-templates select="Measurements/Profile/cyclictest/system/histogram/bucket">
- <xsl:with-param name="label" select="'system'"/>
+ <xsl:with-param name="label" select="'system'"/>
<xsl:sort select="Measurements/Profile/cyclictest/core/histogram/bucket/@index" data-type="number"/>
</xsl:apply-templates>
+ <xsl:apply-templates select="Measurements/Profile/timerlat/system/histogram/bucket">
+ <xsl:with-param name="label" select="'system'"/>
+ <xsl:sort select="Measurements/Profile/timerlat/core/histogram/bucket/@index" data-type="number"/>
+ </xsl:apply-templates>
+
<!-- Extract per cpu core histogram data -->
<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:apply-templates select="Measurements/Profile/timerlat/core/histogram/bucket">
+ <xsl:sort select="Measurements/Profile/timerlat/core/@id" data-type="number"/>
+ <xsl:sort select="Measurements/Profile/timerlat/core/histogram/bucket/@index" data-type="number"/>
+ </xsl:apply-templates>
+
</xsl:template>
<!-- -->
<!-- End of main report framework -->
@@ -43,4 +54,20 @@
<xsl:text>&#10;</xsl:text>
</xsl:template>
+ <xsl:template match="/rteval/Measurements/Profile/timerlat/*/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>
--
2.44.0