Skip to content

Commit

Permalink
Merge pull request #441 from StoneCypher/TryBenchingWithBenny
Browse files Browse the repository at this point in the history
Try benching with benny
  • Loading branch information
StoneCypher authored Apr 26, 2022
2 parents e0045ef + 4fea20f commit e282c60
Show file tree
Hide file tree
Showing 27 changed files with 635 additions and 3,508 deletions.
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,5 @@ src/site/
dist/jssm.es5.iife.nonmin.js
dist/jssm.es5.cjs.nonmin.js
dist/es6/jssm-dot.nonmin.js

benchmark/
116 changes: 116 additions & 0 deletions benchmark/results/general.chart.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" />
<script src="https://cdn.jsdelivr.net/npm/chart.js@3.5.1/dist/chart.min.js"></script>
<title>General performance suite</title>
<style>
body {
margin: 0;
padding: 0;
background: #ddd;
}

.container {
box-sizing: border-box;
height: 96vh;
width: 96vw;
margin: 2vh 2vw;
resize: both;
overflow: hidden;
padding: 20px;
background: white;
box-shadow: 0 0 15px #aaa;
}
</style>
</head>
<body>
<div class="container">
<canvas id="chart1650401117756" width="16" height="9"></canvas>
</div>
<script>
const format = (num) => {
const [whole, fraction] = String(num).split('.')
const chunked = []
whole
.split('')
.reverse()
.forEach((char, index) => {
if (index % 3 === 0) {
chunked.unshift([char])
} else {
chunked[0].unshift(char)
}
})

const fractionStr = fraction !== undefined ? '.' + fraction : ''

return (
chunked.map((chunk) => chunk.join('')).join(' ') + fractionStr
)
}
const ctx1650401117756 = document
.getElementById('chart1650401117756')
.getContext('2d')
const chart1650401117756 = new Chart(ctx1650401117756, {
type: 'bar',
data: {
labels: ["Blind cycle a traffic light 500 times by transition","Blind cycle a traffic light 500 times by action"],
datasets: [
{
data: [9970,8899],
backgroundColor: ["hsl(120, 85%, 55%)","hsl(107.11200000000001, 85%, 55%)"],
borderColor: ["hsl(120, 85%, 55%)","hsl(107.11200000000001, 85%, 55%)"],
borderWidth: 2,
},
],
},
options: {
maintainAspectRatio: false,
plugins: {
title: {
display: true,
text: 'General performance suite',
font: { size: 20 },
padding: 20,
},
legend: {
display: false,
},
tooltip: {
callbacks: {
label: (context) => {
return format(context.parsed.y) + ' ops/s'
},
},
displayColors: false,
backgroundColor: '#222222',
padding: 10,
cornerRadius: 5,
intersect: false,
},
},
scales: {
x: {
grid: {
color: '#888888',
},
},
y: {
title: {
display: true,
text: 'Operations per second',
padding: 10,
},
grid: {
color: '#888888',
},
},
},
},
})
</script>
</body>
</html>
27 changes: 27 additions & 0 deletions benchmark/results/general.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "General performance suite",
"date": "2022-04-19T20:45:17.756Z",
"version": "1.0.0",
"results": [
{
"name": "Blind cycle a traffic light 500 times by transition",
"ops": 9970,
"margin": 5.46,
"percentSlower": 0
},
{
"name": "Blind cycle a traffic light 500 times by action",
"ops": 8899,
"margin": 2.41,
"percentSlower": 10.74
}
],
"fastest": {
"name": "Blind cycle a traffic light 500 times by transition",
"index": 0
},
"slowest": {
"name": "Blind cycle a traffic light 500 times by action",
"index": 1
}
}
2 changes: 1 addition & 1 deletion dist/es6/version.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
const version = "5.43.2";
const version = "5.44.0";
export { version };
2 changes: 1 addition & 1 deletion dist/jssm.es5.cjs.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/jssm.es5.cjs.nonmin.js
Original file line number Diff line number Diff line change
Expand Up @@ -15885,7 +15885,7 @@ function peg$parse(input, options) {
}
}

const version = "5.43.2";
const version = "5.44.0";

// whargarbl lots of these return arrays could/should be sets
/* eslint-disable complexity */
Expand Down
2 changes: 1 addition & 1 deletion dist/jssm.es5.iife.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/jssm.es5.iife.nonmin.js
Original file line number Diff line number Diff line change
Expand Up @@ -15884,7 +15884,7 @@ var jssm = (function (exports) {
}
}

const version = "5.43.2";
const version = "5.44.0";

// whargarbl lots of these return arrays could/should be sets
/* eslint-disable complexity */
Expand Down
1 change: 0 additions & 1 deletion docs/docs/.nojekyll

This file was deleted.

85 changes: 0 additions & 85 deletions docs/docs/assets/highlight.css

This file was deleted.

Loading

0 comments on commit e282c60

Please sign in to comment.