Skip to content

Commit e282c60

Browse files
authored
Merge pull request #441 from StoneCypher/TryBenchingWithBenny
Try benching with benny
2 parents e0045ef + 4fea20f commit e282c60

27 files changed

+635
-3508
lines changed

.npmignore

+2
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,5 @@ src/site/
5555
dist/jssm.es5.iife.nonmin.js
5656
dist/jssm.es5.cjs.nonmin.js
5757
dist/es6/jssm-dot.nonmin.js
58+
59+
benchmark/

benchmark/results/general.chart.html

+116
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<meta http-equiv="X-UA-Compatible" />
7+
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/chart.min.js"></script>
8+
<title>General performance suite</title>
9+
<style>
10+
body {
11+
margin: 0;
12+
padding: 0;
13+
background: #ddd;
14+
}
15+
16+
.container {
17+
box-sizing: border-box;
18+
height: 96vh;
19+
width: 96vw;
20+
margin: 2vh 2vw;
21+
resize: both;
22+
overflow: hidden;
23+
padding: 20px;
24+
background: white;
25+
box-shadow: 0 0 15px #aaa;
26+
}
27+
</style>
28+
</head>
29+
<body>
30+
<div class="container">
31+
<canvas id="chart1650401117756" width="16" height="9"></canvas>
32+
</div>
33+
<script>
34+
const format = (num) => {
35+
const [whole, fraction] = String(num).split('.')
36+
const chunked = []
37+
whole
38+
.split('')
39+
.reverse()
40+
.forEach((char, index) => {
41+
if (index % 3 === 0) {
42+
chunked.unshift([char])
43+
} else {
44+
chunked[0].unshift(char)
45+
}
46+
})
47+
48+
const fractionStr = fraction !== undefined ? '.' + fraction : ''
49+
50+
return (
51+
chunked.map((chunk) => chunk.join('')).join(' ') + fractionStr
52+
)
53+
}
54+
const ctx1650401117756 = document
55+
.getElementById('chart1650401117756')
56+
.getContext('2d')
57+
const chart1650401117756 = new Chart(ctx1650401117756, {
58+
type: 'bar',
59+
data: {
60+
labels: ["Blind cycle a traffic light 500 times by transition","Blind cycle a traffic light 500 times by action"],
61+
datasets: [
62+
{
63+
data: [9970,8899],
64+
backgroundColor: ["hsl(120, 85%, 55%)","hsl(107.11200000000001, 85%, 55%)"],
65+
borderColor: ["hsl(120, 85%, 55%)","hsl(107.11200000000001, 85%, 55%)"],
66+
borderWidth: 2,
67+
},
68+
],
69+
},
70+
options: {
71+
maintainAspectRatio: false,
72+
plugins: {
73+
title: {
74+
display: true,
75+
text: 'General performance suite',
76+
font: { size: 20 },
77+
padding: 20,
78+
},
79+
legend: {
80+
display: false,
81+
},
82+
tooltip: {
83+
callbacks: {
84+
label: (context) => {
85+
return format(context.parsed.y) + ' ops/s'
86+
},
87+
},
88+
displayColors: false,
89+
backgroundColor: '#222222',
90+
padding: 10,
91+
cornerRadius: 5,
92+
intersect: false,
93+
},
94+
},
95+
scales: {
96+
x: {
97+
grid: {
98+
color: '#888888',
99+
},
100+
},
101+
y: {
102+
title: {
103+
display: true,
104+
text: 'Operations per second',
105+
padding: 10,
106+
},
107+
grid: {
108+
color: '#888888',
109+
},
110+
},
111+
},
112+
},
113+
})
114+
</script>
115+
</body>
116+
</html>

benchmark/results/general.json

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"name": "General performance suite",
3+
"date": "2022-04-19T20:45:17.756Z",
4+
"version": "1.0.0",
5+
"results": [
6+
{
7+
"name": "Blind cycle a traffic light 500 times by transition",
8+
"ops": 9970,
9+
"margin": 5.46,
10+
"percentSlower": 0
11+
},
12+
{
13+
"name": "Blind cycle a traffic light 500 times by action",
14+
"ops": 8899,
15+
"margin": 2.41,
16+
"percentSlower": 10.74
17+
}
18+
],
19+
"fastest": {
20+
"name": "Blind cycle a traffic light 500 times by transition",
21+
"index": 0
22+
},
23+
"slowest": {
24+
"name": "Blind cycle a traffic light 500 times by action",
25+
"index": 1
26+
}
27+
}

dist/es6/version.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
const version = "5.43.2";
1+
const version = "5.44.0";
22
export { version };

dist/jssm.es5.cjs.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/jssm.es5.cjs.nonmin.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15885,7 +15885,7 @@ function peg$parse(input, options) {
1588515885
}
1588615886
}
1588715887

15888-
const version = "5.43.2";
15888+
const version = "5.44.0";
1588915889

1589015890
// whargarbl lots of these return arrays could/should be sets
1589115891
/* eslint-disable complexity */

dist/jssm.es5.iife.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/jssm.es5.iife.nonmin.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15884,7 +15884,7 @@ var jssm = (function (exports) {
1588415884
}
1588515885
}
1588615886

15887-
const version = "5.43.2";
15887+
const version = "5.44.0";
1588815888

1588915889
// whargarbl lots of these return arrays could/should be sets
1589015890
/* eslint-disable complexity */

docs/docs/.nojekyll

-1
This file was deleted.

docs/docs/assets/highlight.css

-85
This file was deleted.

0 commit comments

Comments
 (0)