@@ -8,7 +8,6 @@ var nSamples = require('./assets/constants').nSamples;
8
8
var gd = createGraphDiv ( ) ;
9
9
10
10
const samples = Array . from ( { length : nSamples } , ( _ , i ) => i ) ;
11
- const nTimes = samples . length - 1 ;
12
11
13
12
var tests = [ ] ;
14
13
@@ -51,7 +50,7 @@ for(let traceType of ['box', 'violin']) {
51
50
for ( let traceType of [ 'scatter' , 'scattergl' , 'scattergeo' ] ) {
52
51
for ( let mode of [ 'markers' , 'lines' , 'markers+lines' ] ) {
53
52
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 ] ) {
55
54
tests . push ( {
56
55
n :n ,
57
56
nTraces : nTraces ,
@@ -266,14 +265,16 @@ function makeScatterGeo(spec) {
266
265
}
267
266
268
267
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' ;
272
270
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
+ } ) ;
276
276
277
+ tests . forEach ( function ( spec , index ) {
277
278
samples . forEach ( function ( t ) {
278
279
it ( 'turn: ' + t , function ( done ) {
279
280
var startTime , endTime ;
@@ -295,10 +296,6 @@ tests.forEach(function(spec, index) {
295
296
expect ( nodes . size ( ) ) . toEqual ( spec . nTraces ) ;
296
297
}
297
298
298
- if ( t === nTimes && index === tests . length - 1 ) {
299
- downloadCSV ( tests ) ;
300
- }
301
-
302
299
done ( ) ;
303
300
} ) ;
304
301
} ) ;
0 commit comments