Skip to content

Commit

Permalink
Release XLT 7.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jowerner committed Jul 13, 2023
2 parents ef7a9bf + 6d313e9 commit f91f3a2
Show file tree
Hide file tree
Showing 11 changed files with 74 additions and 14 deletions.
4 changes: 3 additions & 1 deletion config/testreport/css/default.css
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,7 @@ button.clear-input
border-color: transparent;
margin-left: -16px;
margin-top: 4px;
cursor: pointer;
}

/*
Expand Down Expand Up @@ -1203,7 +1204,8 @@ table * {
font-size: 100%;
background-color: #FFF;
color: #000;
border: 0 solid #000;
border: 0 solid #FFF;
border-right-width: 16px;
}

@media screen and (max-width:1399px) {
Expand Down
2 changes: 1 addition & 1 deletion config/testreport/js/xlt.js
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@
});

// now filter the charts
$('.charts .chart-group.no-print').each(function() {
$('.charts:not(.overview) .chart-group.no-print').each(function() {
var value = this.getAttribute('data-name');
var visible = filterFunc(value);

Expand Down
10 changes: 10 additions & 0 deletions config/xsl/loadreport/index.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<xsl:include href="sections/general.xsl" />
<xsl:include href="sections/summary.xsl" />
<xsl:include href="sections/network-summary.xsl" />
<xsl:include href="sections/agent-summary.xsl" />

<xsl:include href="util/network-table.xsl" />
<xsl:include href="util/summary-timer-row.xsl" />
Expand Down Expand Up @@ -80,6 +81,15 @@
<xsl:with-param name="rootNode" select="general" />
</xsl:call-template>

<!--
************************************
* Agent Summary
************************************
-->
<xsl:call-template name="agent-summary">
<xsl:with-param name="rootNode" select="agents" />
</xsl:call-template>

<!--
************************************
* Timer Summary
Expand Down
26 changes: 26 additions & 0 deletions config/xsl/loadreport/sections/agent-summary.xsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:template name="agent-summary">
<xsl:param name="rootNode"/>

<div class="section" id="agents">
<xsl:call-template name="headline-agent-summary"/>

<div class="content">
<xsl:call-template name="description-agent-summary"/>

<div class="charts">
<div class="chart">
<img>
<xsl:attribute name="src">charts/agents/All%20Agents/CpuUsage.webp</xsl:attribute>
<xsl:attribute name="alt">"charts/agents/All Agents/CpuUsage.webp"</xsl:attribute>
</img>
</div>
</div>
</div>
</div>

</xsl:template>

</xsl:stylesheet>
2 changes: 1 addition & 1 deletion config/xsl/loadreport/sections/agents.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<div class="content">
<xsl:call-template name="description-agents"/>

<div class="charts">
<div class="charts overview">
<xsl:call-template name="agent-chart">
<xsl:with-param name="directory" select="'All Agents'" />
<xsl:with-param name="isSummary" select="'true'" />
Expand Down
1 change: 1 addition & 0 deletions config/xsl/loadreport/sections/navigation.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<li><a href="index.html#load-profile">Load Profile</a></li>
<li><a href="index.html#comment">Test Comment</a></li>
<li><a href="index.html#general">General Information</a></li>
<li><a href="index.html#agents">Agent Summary</a></li>
<li><a href="index.html#summary">Performance Summary</a></li>
<li><a href="index.html#network">Network</a></li>
</ul>
Expand Down
12 changes: 12 additions & 0 deletions config/xsl/loadreport/text/descriptions.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,18 @@
</div>
</xsl:template>

<!--- ## Description: Agent summary ## -->
<xsl:template name="headline-agent-summary">
<h2>Agent Summary</h2>
</xsl:template>
<xsl:template name="description-agent-summary">
<div class="description">
<p>
The Agent Summary shows you the CPU usage status of all your agent machines. This allows you to quickly see if there are any problems that may or may not have negatively affected the load test result.
</p>
</div>
</xsl:template>

<!--- ## Description: Summary table ## -->
<xsl:template name="headline-summary">
<h2>Performance Summary</h2>
Expand Down
2 changes: 1 addition & 1 deletion config/xsl/loadreport/util/timer-section.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<xsl:param name="runtimeIntervalsNode"/>
<xsl:param name="type"/>

<div class="charts">
<div class="charts overview">
<xsl:for-each select="$summaryElement">
<!-- There is only one matching node. -->
<xsl:call-template name="timer-chart">
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.xceptance</groupId>
<artifactId>xlt</artifactId>
<version>7.0.0</version>
<version>7.1.0</version>
<packaging>jar</packaging>

<name>XLT</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,9 @@ public void run()
// if the agent process monitor is not dead yet, kill the agent process
if (monitor.isAlive())
{
// terminate all descendant processes first
process.descendants().forEach(ProcessHandle::destroyForcibly);
// now terminate the agent process itself
process.destroyForcibly();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

import java.io.File;
import java.io.IOException;
import java.time.Duration;
import java.time.Instant;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
Expand Down Expand Up @@ -490,15 +492,19 @@ public void setAgentNumber(final int agentNumber)
*/
protected void verifyAgentRunning() throws Exception
{
final AgentStatus status = waitForAgentStatus(5000L);
if (status == null)
final Duration timeout = Duration.ofMillis(5000L);
final AgentStatus status = waitForAgentStatus(timeout);
if (status != null)
{
throw new Exception("Agent process started but did not report any status within 5s");
final int exitCode = status.getErrorExitCode();
if (exitCode > 0)
{
throw new Exception("Agent process terminated right after start with exit code '" + exitCode + "'");
}
}
final int exitCode = status.getErrorExitCode();
if (exitCode > 0)
else if (!isAgentRunning())
{
throw new Exception("Agent process terminated right after start with exit code '" + exitCode + "'");
throw new Exception("Agent process is not running and did not report any status within " + timeout.getSeconds() + " seconds");
}
}

Expand All @@ -509,14 +515,14 @@ protected void verifyAgentRunning() throws Exception
* the maximum time to wait
* @return the agent status (may be {@code null} in case no agent status is available within the given time)
*/
private AgentStatus waitForAgentStatus(final long maxWaitingTime)
private AgentStatus waitForAgentStatus(final Duration maxWaitingTime)
{
AgentStatus status;

final long endTime = System.currentTimeMillis() + maxWaitingTime;
final Instant deadline = Instant.now().plus(maxWaitingTime);
while ((status = getAgentStatus()) == null)
{
if (System.currentTimeMillis() > endTime)
if (Instant.now().isAfter(deadline))
{
break;
}
Expand Down

0 comments on commit f91f3a2

Please sign in to comment.