summaryrefslogtreecommitdiffstats
path: root/bench
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2017-02-21 09:43:13 +0100
committerwout <wout@impinc.co.uk>2017-02-21 09:43:13 +0100
commit05e0ed4776394ebe860fd28c66b33cb6d7736bdd (patch)
tree08fad16fe8e9151fcb9505d583f5196cbc081397 /bench
parent1144404e4bea677c293e9bad273ce273aa1cd885 (diff)
downloadsvg.js-05e0ed4776394ebe860fd28c66b33cb6d7736bdd.tar.gz
svg.js-05e0ed4776394ebe860fd28c66b33cb6d7736bdd.zip
Updated bench
Diffstat (limited to 'bench')
-rw-r--r--bench/runner.html2
-rw-r--r--bench/svg.bench.js2
-rw-r--r--bench/tests/10000-circles.js10
-rw-r--r--bench/tests/10000-rects.js12
4 files changed, 13 insertions, 13 deletions
diff --git a/bench/runner.html b/bench/runner.html
index 9fdc898..e70666c 100644
--- a/bench/runner.html
+++ b/bench/runner.html
@@ -37,7 +37,7 @@
<div id="draw"></div>
<svg id="native" width="100" height="100" xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.com/svgjs"></svg>
<script src="../dist/svg.js"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/snap.svg/0.4.1/snap.svg.js"></script>
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/snap.svg/0.5.1/snap.svg-min.js"></script>
<script src="svg.bench.js"></script>
<script src="tests/10000-rects.js"></script>
<script src="tests/10000-circles.js"></script>
diff --git a/bench/svg.bench.js b/bench/svg.bench.js
index 165f87a..ade25d8 100644
--- a/bench/svg.bench.js
+++ b/bench/svg.bench.js
@@ -37,7 +37,7 @@
// Run tests
, run: function() {
- this.pad(true)
+ this.pad()
for (var h, i = 0, il = this._chain.length; i < il; i++) {
var h = document.createElement('h1')
diff --git a/bench/tests/10000-circles.js b/bench/tests/10000-circles.js
index 467c26a..da2a3de 100644
--- a/bench/tests/10000-circles.js
+++ b/bench/tests/10000-circles.js
@@ -1,9 +1,9 @@
SVG.bench.describe('Generate 10000 circles', function(bench) {
- bench.skip('using svg.js v2.3.4', function() {
+ bench.test('using SVG.js v2.4.0', function() {
for (var i = 0; i < 10000; i++)
bench.draw.circle(100,100)
})
- bench.skip('using vanilla js', function() {
+ bench.test('using vanilla js', function() {
for (var i = 0; i < 10000; i++) {
var circle = document.createElementNS(SVG.ns, 'circle')
circle.setAttributeNS(null, 'rx', 50)
@@ -11,14 +11,14 @@ SVG.bench.describe('Generate 10000 circles', function(bench) {
bench.raw.appendChild(circle)
}
})
- bench.skip('using Snap.svg v0.41', function() {
+ bench.test('using Snap.svg v0.5.1', function() {
for (var i = 0; i < 10000; i++)
bench.snap.circle(50, 50, 100, 100)
})
})
SVG.bench.describe('Generate 10000 circles with fill', function(bench) {
- bench.test('using svg.js v2.3.4', function() {
+ bench.test('using SVG.js v2.4.0', function() {
for (var i = 0; i < 10000; i++)
bench.draw.circle(100,100).fill('#f06')
})
@@ -31,7 +31,7 @@ SVG.bench.describe('Generate 10000 circles with fill', function(bench) {
bench.raw.appendChild(circle)
}
})
- bench.test('using Snap.svg v0.41', function() {
+ bench.test('using Snap.svg v0.5.1', function() {
for (var i = 0; i < 10000; i++)
bench.snap.circle(50, 50, 100, 100).attr('fill', '#f06')
})
diff --git a/bench/tests/10000-rects.js b/bench/tests/10000-rects.js
index d7b6303..c39147f 100644
--- a/bench/tests/10000-rects.js
+++ b/bench/tests/10000-rects.js
@@ -1,5 +1,5 @@
SVG.bench.describe('Generate 10000 rects', function(bench) {
- bench.test('using svg.js v2.3.4', function() {
+ bench.test('using SVG.js v2.4.0', function() {
for (var i = 0; i < 10000; i++)
bench.draw.rect(100,100)
})
@@ -11,14 +11,14 @@ SVG.bench.describe('Generate 10000 rects', function(bench) {
bench.raw.appendChild(rect)
}
})
- bench.test('using Snap.svg v0.41', function() {
+ bench.test('using Snap.svg v0.5.1', function() {
for (var i = 0; i < 10000; i++)
bench.snap.rect(50, 50, 100, 100)
})
})
SVG.bench.describe('Generate 10000 rects with fill', function(bench) {
- bench.test('using svg.js v2.3.4', function() {
+ bench.test('using SVG.js v2.4.0', function() {
for (var i = 0; i < 10000; i++)
bench.draw.rect(100,100).fill('#f06')
})
@@ -31,14 +31,14 @@ SVG.bench.describe('Generate 10000 rects with fill', function(bench) {
bench.raw.appendChild(rect)
}
})
- bench.test('using Snap.svg v0.41', function() {
+ bench.test('using Snap.svg v0.5.1', function() {
for (var i = 0; i < 10000; i++)
bench.snap.rect(50, 50, 100, 100).attr('fill', '#f06')
})
})
SVG.bench.describe('Generate 10000 rects with position and fill', function(bench) {
- bench.test('using svg.js v2.3.4', function() {
+ bench.test('using SVG.js v2.4.0', function() {
for (var i = 0; i < 10000; i++)
bench.draw.rect(100,100).move(50,50).fill('#f06')
})
@@ -53,7 +53,7 @@ SVG.bench.describe('Generate 10000 rects with position and fill', function(bench
bench.raw.appendChild(rect)
}
})
- bench.test('using Snap.svg v0.41', function() {
+ bench.test('using Snap.svg v0.5.1', function() {
for (var i = 0; i < 10000; i++)
bench.snap.rect(50, 50, 100, 100).attr('fill', '#f06')
})