Skip to content

Commit ab22eff

Browse files
committed
Update Halogen benchmarks for Halogen 5 and ecosystem changes
1 parent d958202 commit ab22eff

File tree

8 files changed

+247
-324
lines changed

8 files changed

+247
-324
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# Dependencies
22
.psci_modules
3+
.spago
34
bower_components
45
node_modules
56

67
# Generated files
78
.psci
9+
.psc*
810
output
911

frameworks/non-keyed/halogen/bower.json

Lines changed: 0 additions & 28 deletions
This file was deleted.
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<!DOCTYPE html>
22
<html lang="en">
3-
<head>
4-
<meta charset="utf-8" />
5-
<title>Halogen v2.1.0</title>
6-
<link href="/css/currentStyle.css" rel="stylesheet"/>
7-
</head>
8-
<body>
9-
<script src='output/bundle.js'></script>
10-
</body>
3+
<head>
4+
<meta charset="utf-8" />
5+
<title>Halogen v5.0.0</title>
6+
<link href="/css/currentStyle.css" rel="stylesheet" />
7+
</head>
8+
<body>
9+
<script src="output/bundle.js"></script>
10+
</body>
1111
</html>
Lines changed: 28 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,30 @@
11
{
2-
"name": "js-framework-benchmark-pux",
3-
"version": "1.0.0",
4-
"description": "Purescript Halogen JS Benchmark",
5-
"main": "index.js",
6-
"js-framework-benchmark": {
7-
"frameworkVersion": "4.0.0"
8-
},
9-
"scripts": {
10-
"postinstall": "bower install",
11-
"clean": "rimraf output bower_components node_modules",
12-
"build-dev": "pulp browserify --to output/bundle.js",
13-
"build-prod": "pulp browserify --optimise --to output/bundle.js"
14-
},
15-
"keywords": [
16-
"purescript",
17-
"pux"
18-
],
19-
"author": "Thomas Honeyman <hello@thomashoneyman.com>",
20-
"license": "ISC",
21-
"homepage": "https://github.com/krausest/js-framework-benchmark",
22-
"repository": {
23-
"type": "git",
24-
"url": "https://github.com/krausest/js-framework-benchmark.git"
25-
},
26-
"devDependencies": {
27-
"bower": "1.8.4",
28-
"pulp": "12.3.0",
29-
"purescript": "0.12.0",
30-
"rimraf": "2.5.4"
31-
}
2+
"name": "js-framework-benchmark-halogen",
3+
"version": "1.0.0",
4+
"description": "Purescript Halogen JS Benchmark",
5+
"main": "index.js",
6+
"js-framework-benchmark": {
7+
"frameworkVersion": "5.0.0"
8+
},
9+
"scripts": {
10+
"postinstall": "spago install",
11+
"clean": "rm -rf output .spago node_modules",
12+
"build": "spago build",
13+
"build-prod": "spago bundle-app --to output/bundle.js"
14+
},
15+
"keywords": [
16+
"purescript",
17+
"halogen"
18+
],
19+
"author": "Thomas Honeyman <hello@thomashoneyman.com>",
20+
"license": "ISC",
21+
"homepage": "https://github.com/krausest/js-framework-benchmark",
22+
"repository": {
23+
"type": "git",
24+
"url": "https://github.com/krausest/js-framework-benchmark.git"
25+
},
26+
"devDependencies": {
27+
"purescript": "0.13.6",
28+
"spago": "0.14.0"
29+
}
3230
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
let upstream =
2+
https://github.com/purescript/package-sets/releases/download/psc-0.13.6-20200331/packages.dhall sha256:350af1fdc68c91251138198f03ceedc4f8ed6651ee2af8a2177f87bcd64570d4
3+
4+
let overrides =
5+
{ halogen =
6+
upstream.halogen // { version = "v5.0.0-rc.8" }
7+
}
8+
9+
let additions = {=}
10+
11+
in upstream // overrides // additions
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{ name = "js-framework-benchmark-halogen"
2+
, dependencies = [ "halogen" ]
3+
, packages = ./packages.dhall
4+
, sources = [ "src/**/*.purs" ]
5+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
function _random(max) {
2+
return Math.round(Math.random() * 1000) % max;
3+
}
4+
5+
exports.createRandomNRowsImpl = function(
6+
adjectives,
7+
colours,
8+
nouns,
9+
count,
10+
lastId
11+
) {
12+
var data = [];
13+
for (var i = 0; i < count; i++)
14+
data.push({
15+
id: ++lastId,
16+
label:
17+
adjectives[_random(adjectives.length)] +
18+
" " +
19+
colours[_random(colours.length)] +
20+
" " +
21+
nouns[_random(nouns.length)]
22+
});
23+
return data;
24+
};

0 commit comments

Comments
 (0)