File tree Expand file tree Collapse file tree 9 files changed +43
-40
lines changed
test/jasmine/performance_tests Expand file tree Collapse file tree 9 files changed +43
-40
lines changed Original file line number Diff line number Diff line change @@ -5,8 +5,13 @@ var Plotly = require('../../../lib/core');
5
5
var PlotlyBar = require ( '../../../lib/bar' ) ;
6
6
var writeRawDataAsCSV = require ( './assets/post_process' ) . writeRawDataAsCSV ;
7
7
8
+ Plotly . register ( PlotlyBar ) ;
9
+
8
10
var gd = createGraphDiv ( ) ;
9
11
12
+ const samples = Array . from ( { length : 9 } , ( _ , i ) => i ) ;
13
+ const nTimes = samples . length - 1 ;
14
+
10
15
var tests = [ {
11
16
n : 1000
12
17
} , {
@@ -27,11 +32,6 @@ tests.forEach(function(spec, index) {
27
32
describe ( 'Performance test bar | size:' + spec . n , function ( ) {
28
33
'use strict' ;
29
34
30
- Plotly . register ( PlotlyBar ) ;
31
-
32
- const samples = Array . from ( { length : 9 } , ( _ , i ) => i ) ;
33
- const nTimes = samples . length - 1 ;
34
-
35
35
var y = Float64Array . from ( { length : spec . n } , ( _ , i ) => i * Math . cos ( Math . sqrt ( i ) ) ) ;
36
36
37
37
var mock = {
Original file line number Diff line number Diff line change @@ -5,8 +5,13 @@ var Plotly = require('../../../lib/core');
5
5
var PlotlyBox = require ( '../../../lib/box' ) ;
6
6
var writeRawDataAsCSV = require ( './assets/post_process' ) . writeRawDataAsCSV ;
7
7
8
+ Plotly . register ( PlotlyBox ) ;
9
+
8
10
var gd = createGraphDiv ( ) ;
9
11
12
+ const samples = Array . from ( { length : 9 } , ( _ , i ) => i ) ;
13
+ const nTimes = samples . length - 1 ;
14
+
10
15
var tests = [ {
11
16
n : 1000
12
17
} , {
@@ -27,11 +32,6 @@ tests.forEach(function(spec, index) {
27
32
describe ( 'Performance test box | size:' + spec . n , function ( ) {
28
33
'use strict' ;
29
34
30
- Plotly . register ( PlotlyBox ) ;
31
-
32
- const samples = Array . from ( { length : 9 } , ( _ , i ) => i ) ;
33
- const nTimes = samples . length - 1 ;
34
-
35
35
var y = Float64Array . from ( { length : spec . n } , ( _ , i ) => i * Math . cos ( Math . sqrt ( i ) ) ) ;
36
36
37
37
var mock = {
Original file line number Diff line number Diff line change @@ -5,8 +5,13 @@ var Plotly = require('../../../lib/core');
5
5
var PlotlyContour = require ( '../../../lib/contour' ) ;
6
6
var writeRawDataAsCSV = require ( './assets/post_process' ) . writeRawDataAsCSV ;
7
7
8
+ Plotly . register ( PlotlyContour ) ;
9
+
8
10
var gd = createGraphDiv ( ) ;
9
11
12
+ const samples = Array . from ( { length : 9 } , ( _ , i ) => i ) ;
13
+ const nTimes = samples . length - 1 ;
14
+
10
15
var tests = [ {
11
16
nx : 50 , ny : 20
12
17
} , {
@@ -27,11 +32,6 @@ tests.forEach(function(spec, index) {
27
32
describe ( 'Performance test contour | size:' + spec . nx + 'X' + spec . ny , function ( ) {
28
33
'use strict' ;
29
34
30
- Plotly . register ( PlotlyContour ) ;
31
-
32
- const samples = Array . from ( { length : 9 } , ( _ , i ) => i ) ;
33
- const nTimes = samples . length - 1 ;
34
-
35
35
var A = spec . nx ;
36
36
var B = spec . ny ;
37
37
spec . n = A * B ;
Original file line number Diff line number Diff line change @@ -5,8 +5,13 @@ var Plotly = require('../../../lib/core');
5
5
var PlotlyHeatmap = require ( '../../../lib/heatmap' ) ;
6
6
var writeRawDataAsCSV = require ( './assets/post_process' ) . writeRawDataAsCSV ;
7
7
8
+ Plotly . register ( PlotlyHeatmap ) ;
9
+
8
10
var gd = createGraphDiv ( ) ;
9
11
12
+ const samples = Array . from ( { length : 9 } , ( _ , i ) => i ) ;
13
+ const nTimes = samples . length - 1 ;
14
+
10
15
var tests = [ {
11
16
nx : 50 , ny : 20
12
17
} , {
@@ -27,11 +32,6 @@ tests.forEach(function(spec, index) {
27
32
describe ( 'Performance test heatmap | size:' + spec . nx + 'X' + spec . ny , function ( ) {
28
33
'use strict' ;
29
34
30
- Plotly . register ( PlotlyHeatmap ) ;
31
-
32
- const samples = Array . from ( { length : 9 } , ( _ , i ) => i ) ;
33
- const nTimes = samples . length - 1 ;
34
-
35
35
var A = spec . nx ;
36
36
var B = spec . ny ;
37
37
spec . n = A * B ;
Original file line number Diff line number Diff line change @@ -5,8 +5,13 @@ var Plotly = require('../../../lib/core');
5
5
var PlotlyHistogram = require ( '../../../lib/histogram' ) ;
6
6
var writeRawDataAsCSV = require ( './assets/post_process' ) . writeRawDataAsCSV ;
7
7
8
+ Plotly . register ( PlotlyHistogram ) ;
9
+
8
10
var gd = createGraphDiv ( ) ;
9
11
12
+ const samples = Array . from ( { length : 9 } , ( _ , i ) => i ) ;
13
+ const nTimes = samples . length - 1 ;
14
+
10
15
var tests = [ {
11
16
n : 1000
12
17
} , {
@@ -27,11 +32,6 @@ tests.forEach(function(spec, index) {
27
32
describe ( 'Performance test histogram | size:' + spec . n , function ( ) {
28
33
'use strict' ;
29
34
30
- Plotly . register ( PlotlyHistogram ) ;
31
-
32
- const samples = Array . from ( { length : 9 } , ( _ , i ) => i ) ;
33
- const nTimes = samples . length - 1 ;
34
-
35
35
var x = Float64Array . from ( { length : spec . n } , ( _ , i ) => i * Math . cos ( Math . sqrt ( i ) ) ) ;
36
36
37
37
var mock = {
Original file line number Diff line number Diff line change @@ -5,8 +5,13 @@ var Plotly = require('../../../lib/core');
5
5
var PlotlyImage = require ( '../../../lib/image' ) ;
6
6
var writeRawDataAsCSV = require ( './assets/post_process' ) . writeRawDataAsCSV ;
7
7
8
+ Plotly . register ( PlotlyImage ) ;
9
+
8
10
var gd = createGraphDiv ( ) ;
9
11
12
+ const samples = Array . from ( { length : 9 } , ( _ , i ) => i ) ;
13
+ const nTimes = samples . length - 1 ;
14
+
10
15
var tests = [ {
11
16
nx : 50 , ny : 20
12
17
} , {
@@ -27,8 +32,6 @@ tests.forEach(function(spec, index) {
27
32
describe ( 'Performance test image | size:' + spec . nx + 'X' + spec . ny , function ( ) {
28
33
'use strict' ;
29
34
30
- Plotly . register ( PlotlyImage ) ;
31
-
32
35
const samples = Array . from ( { length : 9 } , ( _ , i ) => i ) ;
33
36
const nTimes = samples . length - 1 ;
34
37
Original file line number Diff line number Diff line change @@ -6,6 +6,9 @@ var writeRawDataAsCSV = require('./assets/post_process').writeRawDataAsCSV;
6
6
7
7
var gd = createGraphDiv ( ) ;
8
8
9
+ const samples = Array . from ( { length : 9 } , ( _ , i ) => i ) ;
10
+ const nTimes = samples . length - 1 ;
11
+
9
12
var tests = [ {
10
13
n : 1000
11
14
} , {
@@ -26,9 +29,6 @@ tests.forEach(function(spec, index) {
26
29
describe ( 'Performance test scatter | size:' + spec . n , function ( ) {
27
30
'use strict' ;
28
31
29
- const samples = Array . from ( { length : 9 } , ( _ , i ) => i ) ;
30
- const nTimes = samples . length - 1 ;
31
-
32
32
var y = Float64Array . from ( { length : spec . n } , ( _ , i ) => i * Math . cos ( Math . sqrt ( i ) ) ) ;
33
33
34
34
var mock = {
Original file line number Diff line number Diff line change @@ -4,8 +4,13 @@ var Plotly = require('../../../lib/core');
4
4
var PlotlyScattergl = require ( '../../../lib/scattergl' ) ;
5
5
var writeRawDataAsCSV = require ( './assets/post_process' ) . writeRawDataAsCSV ;
6
6
7
+ Plotly . register ( PlotlyScattergl ) ;
8
+
7
9
var gd = createGraphDiv ( ) ;
8
10
11
+ const samples = Array . from ( { length : 9 } , ( _ , i ) => i ) ;
12
+ const nTimes = samples . length - 1 ;
13
+
9
14
var tests = [ {
10
15
n : 1000
11
16
} , {
@@ -34,11 +39,6 @@ tests.forEach(function(spec, index) {
34
39
describe ( 'Performance test scattergl | size:' + spec . n , function ( ) {
35
40
'use strict' ;
36
41
37
- Plotly . register ( PlotlyScattergl ) ;
38
-
39
- const samples = Array . from ( { length : 9 } , ( _ , i ) => i ) ;
40
- const nTimes = samples . length - 1 ;
41
-
42
42
var y = Float64Array . from ( { length : spec . n } , ( _ , i ) => i * Math . cos ( Math . sqrt ( i ) ) ) ;
43
43
44
44
var mock = {
Original file line number Diff line number Diff line change @@ -5,8 +5,13 @@ var Plotly = require('../../../lib/core');
5
5
var PlotlyViolin = require ( '../../../lib/violin' ) ;
6
6
var writeRawDataAsCSV = require ( './assets/post_process' ) . writeRawDataAsCSV ;
7
7
8
+ Plotly . register ( PlotlyViolin ) ;
9
+
8
10
var gd = createGraphDiv ( ) ;
9
11
12
+ const samples = Array . from ( { length : 9 } , ( _ , i ) => i ) ;
13
+ const nTimes = samples . length - 1 ;
14
+
10
15
var tests = [ {
11
16
n : 1000
12
17
} , {
@@ -27,11 +32,6 @@ tests.forEach(function(spec, index) {
27
32
describe ( 'Performance test violin | size:' + spec . n , function ( ) {
28
33
'use strict' ;
29
34
30
- Plotly . register ( PlotlyViolin ) ;
31
-
32
- const samples = Array . from ( { length : 9 } , ( _ , i ) => i ) ;
33
- const nTimes = samples . length - 1 ;
34
-
35
35
var y = Float64Array . from ( { length : spec . n } , ( _ , i ) => i * Math . cos ( Math . sqrt ( i ) ) ) ;
36
36
37
37
var mock = {
You can’t perform that action at this time.
0 commit comments