Permalink
Browse files

line sampling benchmark

  • Loading branch information...
1 parent 2ee3bbf commit d0756f70536f5d5fb7b2b30b5a41be5b0676bc76 Ovilia committed Jul 29, 2016
Showing with 9 additions and 6 deletions.
  1. +2 −5 benchmark/src/app.js
  2. +6 −0 benchmark/src/testFactory.js
  3. +1 −1 benchmark/src/testManager.js
@@ -11,13 +11,10 @@ define(function (require) {
el: '#app',
data: {
- caseNames: ['line'],
+ caseNames: ['line sampling'],
amounts: (function () {
var arr = [];
- for (var i = 5000; i > 4000; i -= 50) {
- arr.push(i);
- }
- for (var i = 4000; i > 0; i -= 200) {
+ for (var i = 1000000; i > 0; i -= 10000) {
arr.push(i);
}
return arr;
@@ -20,6 +20,7 @@ define(function (require) {
var option = null;
switch (name) {
case 'line':
+ case 'line sampling':
case 'bar':
case 'scatter':
option = {
@@ -50,6 +51,11 @@ define(function (require) {
return null;
}
+ if (name === 'line sampling') {
+ option.series.sampling = 'max';
+ option.series.type = 'line';
+ }
+
option.animation = false;
return new TestCase(name, option);
};
@@ -46,7 +46,7 @@ define(function (require) {
// cancel if last test time of the same caseName is larger than 5
var test = factory.create(this.caseNames[cid], this.amounts[aid]);
- var time = Math.floor(test.runTime(20));
+ var time = Math.floor(test.runTime(50));
if (!this.times[aid]) {
this.times[aid] = [];
}

0 comments on commit d0756f7

Please sign in to comment.