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');
55var PlotlyBar = require ( '../../../lib/bar' ) ;
66var writeRawDataAsCSV = require ( './assets/post_process' ) . writeRawDataAsCSV ;
77
8+ Plotly . register ( PlotlyBar ) ;
9+
810var gd = createGraphDiv ( ) ;
911
12+ const samples = Array . from ( { length : 9 } , ( _ , i ) => i ) ;
13+ const nTimes = samples . length - 1 ;
14+
1015var tests = [ {
1116 n : 1000
1217} , {
@@ -27,11 +32,6 @@ tests.forEach(function(spec, index) {
2732 describe ( 'Performance test bar | size:' + spec . n , function ( ) {
2833 'use strict' ;
2934
30- Plotly . register ( PlotlyBar ) ;
31-
32- const samples = Array . from ( { length : 9 } , ( _ , i ) => i ) ;
33- const nTimes = samples . length - 1 ;
34-
3535 var y = Float64Array . from ( { length : spec . n } , ( _ , i ) => i * Math . cos ( Math . sqrt ( i ) ) ) ;
3636
3737 var mock = {
Original file line number Diff line number Diff line change @@ -5,8 +5,13 @@ var Plotly = require('../../../lib/core');
55var PlotlyBox = require ( '../../../lib/box' ) ;
66var writeRawDataAsCSV = require ( './assets/post_process' ) . writeRawDataAsCSV ;
77
8+ Plotly . register ( PlotlyBox ) ;
9+
810var gd = createGraphDiv ( ) ;
911
12+ const samples = Array . from ( { length : 9 } , ( _ , i ) => i ) ;
13+ const nTimes = samples . length - 1 ;
14+
1015var tests = [ {
1116 n : 1000
1217} , {
@@ -27,11 +32,6 @@ tests.forEach(function(spec, index) {
2732 describe ( 'Performance test box | size:' + spec . n , function ( ) {
2833 'use strict' ;
2934
30- Plotly . register ( PlotlyBox ) ;
31-
32- const samples = Array . from ( { length : 9 } , ( _ , i ) => i ) ;
33- const nTimes = samples . length - 1 ;
34-
3535 var y = Float64Array . from ( { length : spec . n } , ( _ , i ) => i * Math . cos ( Math . sqrt ( i ) ) ) ;
3636
3737 var mock = {
Original file line number Diff line number Diff line change @@ -5,8 +5,13 @@ var Plotly = require('../../../lib/core');
55var PlotlyContour = require ( '../../../lib/contour' ) ;
66var writeRawDataAsCSV = require ( './assets/post_process' ) . writeRawDataAsCSV ;
77
8+ Plotly . register ( PlotlyContour ) ;
9+
810var gd = createGraphDiv ( ) ;
911
12+ const samples = Array . from ( { length : 9 } , ( _ , i ) => i ) ;
13+ const nTimes = samples . length - 1 ;
14+
1015var tests = [ {
1116 nx : 50 , ny : 20
1217} , {
@@ -27,11 +32,6 @@ tests.forEach(function(spec, index) {
2732 describe ( 'Performance test contour | size:' + spec . nx + 'X' + spec . ny , function ( ) {
2833 'use strict' ;
2934
30- Plotly . register ( PlotlyContour ) ;
31-
32- const samples = Array . from ( { length : 9 } , ( _ , i ) => i ) ;
33- const nTimes = samples . length - 1 ;
34-
3535 var A = spec . nx ;
3636 var B = spec . ny ;
3737 spec . n = A * B ;
Original file line number Diff line number Diff line change @@ -5,8 +5,13 @@ var Plotly = require('../../../lib/core');
55var PlotlyHeatmap = require ( '../../../lib/heatmap' ) ;
66var writeRawDataAsCSV = require ( './assets/post_process' ) . writeRawDataAsCSV ;
77
8+ Plotly . register ( PlotlyHeatmap ) ;
9+
810var gd = createGraphDiv ( ) ;
911
12+ const samples = Array . from ( { length : 9 } , ( _ , i ) => i ) ;
13+ const nTimes = samples . length - 1 ;
14+
1015var tests = [ {
1116 nx : 50 , ny : 20
1217} , {
@@ -27,11 +32,6 @@ tests.forEach(function(spec, index) {
2732 describe ( 'Performance test heatmap | size:' + spec . nx + 'X' + spec . ny , function ( ) {
2833 'use strict' ;
2934
30- Plotly . register ( PlotlyHeatmap ) ;
31-
32- const samples = Array . from ( { length : 9 } , ( _ , i ) => i ) ;
33- const nTimes = samples . length - 1 ;
34-
3535 var A = spec . nx ;
3636 var B = spec . ny ;
3737 spec . n = A * B ;
Original file line number Diff line number Diff line change @@ -5,8 +5,13 @@ var Plotly = require('../../../lib/core');
55var PlotlyHistogram = require ( '../../../lib/histogram' ) ;
66var writeRawDataAsCSV = require ( './assets/post_process' ) . writeRawDataAsCSV ;
77
8+ Plotly . register ( PlotlyHistogram ) ;
9+
810var gd = createGraphDiv ( ) ;
911
12+ const samples = Array . from ( { length : 9 } , ( _ , i ) => i ) ;
13+ const nTimes = samples . length - 1 ;
14+
1015var tests = [ {
1116 n : 1000
1217} , {
@@ -27,11 +32,6 @@ tests.forEach(function(spec, index) {
2732 describe ( 'Performance test histogram | size:' + spec . n , function ( ) {
2833 'use strict' ;
2934
30- Plotly . register ( PlotlyHistogram ) ;
31-
32- const samples = Array . from ( { length : 9 } , ( _ , i ) => i ) ;
33- const nTimes = samples . length - 1 ;
34-
3535 var x = Float64Array . from ( { length : spec . n } , ( _ , i ) => i * Math . cos ( Math . sqrt ( i ) ) ) ;
3636
3737 var mock = {
Original file line number Diff line number Diff line change @@ -5,8 +5,13 @@ var Plotly = require('../../../lib/core');
55var PlotlyImage = require ( '../../../lib/image' ) ;
66var writeRawDataAsCSV = require ( './assets/post_process' ) . writeRawDataAsCSV ;
77
8+ Plotly . register ( PlotlyImage ) ;
9+
810var gd = createGraphDiv ( ) ;
911
12+ const samples = Array . from ( { length : 9 } , ( _ , i ) => i ) ;
13+ const nTimes = samples . length - 1 ;
14+
1015var tests = [ {
1116 nx : 50 , ny : 20
1217} , {
@@ -27,8 +32,6 @@ tests.forEach(function(spec, index) {
2732 describe ( 'Performance test image | size:' + spec . nx + 'X' + spec . ny , function ( ) {
2833 'use strict' ;
2934
30- Plotly . register ( PlotlyImage ) ;
31-
3235 const samples = Array . from ( { length : 9 } , ( _ , i ) => i ) ;
3336 const nTimes = samples . length - 1 ;
3437
Original file line number Diff line number Diff line change @@ -6,6 +6,9 @@ var writeRawDataAsCSV = require('./assets/post_process').writeRawDataAsCSV;
66
77var gd = createGraphDiv ( ) ;
88
9+ const samples = Array . from ( { length : 9 } , ( _ , i ) => i ) ;
10+ const nTimes = samples . length - 1 ;
11+
912var tests = [ {
1013 n : 1000
1114} , {
@@ -26,9 +29,6 @@ tests.forEach(function(spec, index) {
2629 describe ( 'Performance test scatter | size:' + spec . n , function ( ) {
2730 'use strict' ;
2831
29- const samples = Array . from ( { length : 9 } , ( _ , i ) => i ) ;
30- const nTimes = samples . length - 1 ;
31-
3232 var y = Float64Array . from ( { length : spec . n } , ( _ , i ) => i * Math . cos ( Math . sqrt ( i ) ) ) ;
3333
3434 var mock = {
Original file line number Diff line number Diff line change @@ -4,8 +4,13 @@ var Plotly = require('../../../lib/core');
44var PlotlyScattergl = require ( '../../../lib/scattergl' ) ;
55var writeRawDataAsCSV = require ( './assets/post_process' ) . writeRawDataAsCSV ;
66
7+ Plotly . register ( PlotlyScattergl ) ;
8+
79var gd = createGraphDiv ( ) ;
810
11+ const samples = Array . from ( { length : 9 } , ( _ , i ) => i ) ;
12+ const nTimes = samples . length - 1 ;
13+
914var tests = [ {
1015 n : 1000
1116} , {
@@ -34,11 +39,6 @@ tests.forEach(function(spec, index) {
3439 describe ( 'Performance test scattergl | size:' + spec . n , function ( ) {
3540 'use strict' ;
3641
37- Plotly . register ( PlotlyScattergl ) ;
38-
39- const samples = Array . from ( { length : 9 } , ( _ , i ) => i ) ;
40- const nTimes = samples . length - 1 ;
41-
4242 var y = Float64Array . from ( { length : spec . n } , ( _ , i ) => i * Math . cos ( Math . sqrt ( i ) ) ) ;
4343
4444 var mock = {
Original file line number Diff line number Diff line change @@ -5,8 +5,13 @@ var Plotly = require('../../../lib/core');
55var PlotlyViolin = require ( '../../../lib/violin' ) ;
66var writeRawDataAsCSV = require ( './assets/post_process' ) . writeRawDataAsCSV ;
77
8+ Plotly . register ( PlotlyViolin ) ;
9+
810var gd = createGraphDiv ( ) ;
911
12+ const samples = Array . from ( { length : 9 } , ( _ , i ) => i ) ;
13+ const nTimes = samples . length - 1 ;
14+
1015var tests = [ {
1116 n : 1000
1217} , {
@@ -27,11 +32,6 @@ tests.forEach(function(spec, index) {
2732 describe ( 'Performance test violin | size:' + spec . n , function ( ) {
2833 'use strict' ;
2934
30- Plotly . register ( PlotlyViolin ) ;
31-
32- const samples = Array . from ( { length : 9 } , ( _ , i ) => i ) ;
33- const nTimes = samples . length - 1 ;
34-
3535 var y = Float64Array . from ( { length : spec . n } , ( _ , i ) => i * Math . cos ( Math . sqrt ( i ) ) ) ;
3636
3737 var mock = {
You can’t perform that action at this time.
0 commit comments