Skip to content

Commit

Permalink
Optimized report generation, see #88
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanolson committed Jul 8, 2020
1 parent 7bcb33e commit e7ea2e5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion js/server/ContinuousServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,13 @@ class ContinuousServer {
async generateReportLoop() {
while ( true ) { // eslint-disable-line
try {
const testNames = _.sortBy( _.uniqWith( _.flatten( this.snapshots.map( snapshot => snapshot.tests.map( test => test.names ) ) ), _.isEqual ), names => names.toString() );
const testNameMap = {};
this.snapshots.forEach( snapshot => snapshot.tests.forEach( test => {
testNameMap[ test.nameString ] = test.names;
} ) );
const testNameStrings = _.sortBy( Object.keys( testNameMap ) );
const testNames = testNameStrings.map( nameString => testNameMap[ nameString ] );

const elapsedTimes = testNames.map( () => 0 );
const numElapsedTimes = testNames.map( () => 0 );

Expand Down

0 comments on commit e7ea2e5

Please sign in to comment.