Skip to content

Commit

Permalink
Fix #4183: Adjust Overall Performance runtime calculation in HTML rep…
Browse files Browse the repository at this point in the history
…orter
  • Loading branch information
Vaibhavsahu2810 committed Nov 15, 2024
1 parent 8f4a330 commit 308308e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lib/reporter/reporters/html.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,19 @@ class HtmlReporter extends BaseReporter {
}

aggregateStats() {
const startTime = new Date(this.results.startTimestamp).getTime();
const endTime = new Date(this.results.endTimestamp).getTime();
let totalTimeMs = 0;

for (const envName of Object.keys(this.environments)) {
const env = this.environments[envName];
totalTimeMs += env.stats.time;
}

const stats = {
total: 0,
passed: 0,
failed: 0,
skipped: 0,
time: endTime - startTime
time: totalTimeMs
};

for (const envName of Object.keys(this.environments)) {
Expand Down

0 comments on commit 308308e

Please sign in to comment.