@@ -8,7 +8,6 @@ var nSamples = require('./assets/constants').nSamples;
88var gd = createGraphDiv ( ) ;
99
1010const samples = Array . from ( { length : nSamples } , ( _ , i ) => i ) ;
11- const nTimes = samples . length - 1 ;
1211
1312var tests = [ ] ;
1413
@@ -51,7 +50,7 @@ for(let traceType of ['box', 'violin']) {
5150for ( let traceType of [ 'scatter' , 'scattergl' , 'scattergeo' ] ) {
5251 for ( let mode of [ 'markers' , 'lines' , 'markers+lines' ] ) {
5352 for ( let nTraces of [ 1 , 10 , 100 ] ) {
54- for ( let n of [ 1000 , 2000 , 4000 , 8000 , 16000 , 32000 , 64000 ] ) {
53+ for ( let n of [ 1000 , 2000 , 4000 , 8000 , 16000 , 32000 ] ) {
5554 tests . push ( {
5655 n :n ,
5756 nTraces : nTraces ,
@@ -266,14 +265,16 @@ function makeScatterGeo(spec) {
266265}
267266
268267
269- tests . forEach ( function ( spec , index ) {
270- describe ( 'Performance test ' + spec . nTraces + ' ' + spec . traceType + ( spec . mode ? ' | mode: ' + spec . mode : '' ) + ' | size:' + spec . n , function ( ) {
271- 'use strict' ;
268+ describe ( 'Performance test various traces' , function ( ) {
269+ 'use strict' ;
272270
273- afterEach ( function ( done ) {
274- delay ( 100 ) ( ) . then ( done ) ;
275- } ) ;
271+ afterAll ( function ( done ) {
272+ downloadCSV ( tests ) ;
273+ // delay for the download to be completed
274+ delay ( 1000 ) ( ) . then ( done )
275+ } ) ;
276276
277+ tests . forEach ( function ( spec , index ) {
277278 samples . forEach ( function ( t ) {
278279 it ( 'turn: ' + t , function ( done ) {
279280 var startTime , endTime ;
@@ -295,10 +296,6 @@ tests.forEach(function(spec, index) {
295296 expect ( nodes . size ( ) ) . toEqual ( spec . nTraces ) ;
296297 }
297298
298- if ( t === nTimes && index === tests . length - 1 ) {
299- downloadCSV ( tests ) ;
300- }
301-
302299 done ( ) ;
303300 } ) ;
304301 } ) ;
0 commit comments