From 9b7222e3e92396ea4173cc59a30708c54e92b648 Mon Sep 17 00:00:00 2001 From: Andreas Kohn Date: Sun, 11 May 2025 13:24:07 +0200 Subject: [PATCH 1/4] Show the start time instead of the end time in the results history --- source/console/src/Components/History/History.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/console/src/Components/History/History.js b/source/console/src/Components/History/History.js index 3c4b3a9..a21c049 100644 --- a/source/console/src/Components/History/History.js +++ b/source/console/src/Components/History/History.js @@ -57,7 +57,7 @@ class History extends React.Component { - + @@ -78,7 +78,7 @@ class History extends React.Component { key={i.testRunId} className={this.state.rowIsActive === index ? "rowActive" : ""} > - + @@ -101,7 +101,7 @@ class History extends React.Component { this.setState({ rowIsActive: -1 }); }} > -

Test run from {i.endTime}

+

Test run from {testRun.startTime} to {testRun.endTime}

Date: Sun, 11 May 2025 13:25:32 +0200 Subject: [PATCH 2/4] Sort the results history by start time --- .../console/src/Components/History/History.js | 30 ++++++++++++------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/source/console/src/Components/History/History.js b/source/console/src/Components/History/History.js index a21c049..857d390 100644 --- a/source/console/src/Components/History/History.js +++ b/source/console/src/Components/History/History.js @@ -50,6 +50,21 @@ class History extends React.Component { render() { const history = this.props.data.history || []; + + // Enrich the history with more data, and sort by start time. + const resultsHistory = history.map((testRun) => { + const loadInfo = testRun.testTaskConfigs.reduce((previous, current) => ({ + taskCount: previous.taskCount + current.taskCount, + concurrency: previous.concurrency + current.concurrency, + })); + const data = this.getHistoricalTest(testRun); + return { + testRun, + data, + loadInfo, + }; + }); + resultsHistory.sort((a, b) => new Date(b.testRun.startTime) - new Date(a.testRun.startTime)); return (
@@ -66,23 +81,18 @@ class History extends React.Component {
- {history.map((i, index) => { - const loadInfo = i.testTaskConfigs.reduce((previous, current) => ({ - taskCount: previous.taskCount + current.taskCount, - concurrency: previous.concurrency + current.concurrency, - })); - const data = this.getHistoricalTest(i); + {resultsHistory.map(({testRun, data, loadInfo}, index) => { return ( - + - - + + - {resultsHistory.map(({testRun, data, loadInfo}, index) => { + {resultsHistory.map(({ testRun, data, loadInfo }, index) => { return ( -

Test run from {testRun.startTime} to {testRun.endTime}

+

+ Test run from {testRun.startTime} to {testRun.endTime} +

Run TimeStarted at Total Task Count Total Concurrency Average Response Time{i.endTime}{i.startTime} {loadInfo.taskCount} {loadInfo.concurrency} {i.results.total?.avg_rt}s
{i.startTime}{testRun.startTime} {loadInfo.taskCount} {loadInfo.concurrency}{i.results.total?.avg_rt}s{i.succPercent}%{testRun.results.total?.avg_rt}s{testRun.succPercent}%