Skip to content

Commit 07505fe

Browse files
committed
lint
1 parent 18751cc commit 07505fe

File tree

4 files changed

+31
-40
lines changed

4 files changed

+31
-40
lines changed

benchmarking/benchmarks/reactivity/index.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
import {
2-
kairo_avoidable_owned,
3-
kairo_avoidable_unowned
4-
} from './kairo/kairo_avoidable.js';
1+
import { kairo_avoidable_owned, kairo_avoidable_unowned } from './kairo/kairo_avoidable.js';
52
import { kairo_broad_owned, kairo_broad_unowned } from './kairo/kairo_broad.js';
63
import { kairo_deep_owned, kairo_deep_unowned } from './kairo/kairo_deep.js';
74
import { kairo_diamond_owned, kairo_diamond_unowned } from './kairo/kairo_diamond.js';
Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
import { wrapper_bench } from "./wrapper/wrapper_bench.js";
1+
import { wrapper_bench } from './wrapper/wrapper_bench.js';
22

3-
4-
export const ssr_benchmarks = [
5-
wrapper_bench
6-
]
3+
export const ssr_benchmarks = [wrapper_bench];
Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,31 @@
11
<script>
2-
const wrapperWidth = 960
3-
const wrapperHeight = 720
4-
const cellSize = 10
5-
const centerX = wrapperWidth / 2
6-
const centerY = wrapperHeight / 2
2+
const wrapperWidth = 960;
3+
const wrapperHeight = 720;
4+
const cellSize = 10;
5+
const centerX = wrapperWidth / 2;
6+
const centerY = wrapperHeight / 2;
77
8-
let angle = 0
9-
let radius = 0
8+
let angle = 0;
9+
let radius = 0;
1010
11-
let tiles = []
12-
const step = cellSize
11+
let tiles = [];
12+
const step = cellSize;
1313
14-
while (radius < Math.min(wrapperWidth, wrapperHeight) / 2) {
15-
let x = centerX + Math.cos(angle) * radius
16-
let y = centerY + Math.sin(angle) * radius
14+
while (radius < Math.min(wrapperWidth, wrapperHeight) / 2) {
15+
let x = centerX + Math.cos(angle) * radius;
16+
let y = centerY + Math.sin(angle) * radius;
1717
18-
if (x >= 0 && x <= wrapperWidth - cellSize && y >= 0 && y <= wrapperHeight - cellSize) {
19-
tiles.push({ x, y })
20-
}
18+
if (x >= 0 && x <= wrapperWidth - cellSize && y >= 0 && y <= wrapperHeight - cellSize) {
19+
tiles.push({ x, y });
20+
}
2121
22-
angle += 0.2
23-
radius += step * 0.015
24-
}
22+
angle += 0.2;
23+
radius += step * 0.015;
24+
}
2525
</script>
2626

2727
<div id="wrapper">
28-
{#each tiles as { x, y }}
29-
<div
30-
class="tile"
31-
style="left: {x.toFixed(2)}px; top: {y.toFixed(2)}px;">
32-
</div>
33-
{/each}
28+
{#each tiles as { x, y }}
29+
<div class="tile" style="left: {x.toFixed(2)}px; top: {y.toFixed(2)}px;"></div>
30+
{/each}
3431
</div>

benchmarking/benchmarks/ssr/wrapper/wrapper_bench.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
import { render } from "svelte/server";
2-
import { fastest_test, read_file, write } from "../../../utils.js";
3-
import { compile } from "svelte/compiler";
1+
import { render } from 'svelte/server';
2+
import { fastest_test, read_file, write } from '../../../utils.js';
3+
import { compile } from 'svelte/compiler';
44

5-
const dir = `${process.cwd()}/benchmarking/benchmarks/ssr/wrapper`
5+
const dir = `${process.cwd()}/benchmarking/benchmarks/ssr/wrapper`;
66

77
async function compile_svelte() {
88
const output = compile(read_file(`${dir}/App.svelte`), {
99
generate: 'server'
1010
});
11-
write(`${dir}/output/App.js`, output.js.code)
11+
write(`${dir}/output/App.js`, output.js.code);
1212

1313
const module = await import(`${dir}/output/App.js`);
1414

@@ -19,12 +19,12 @@ export async function wrapper_bench() {
1919
const App = await compile_svelte();
2020
// Do 3 loops to warm up JIT
2121
for (let i = 0; i < 3; i++) {
22-
render(App)
22+
render(App);
2323
}
2424

2525
const { timing } = await fastest_test(10, () => {
2626
for (let i = 0; i < 100; i++) {
27-
render(App)
27+
render(App);
2828
}
2929
});
3030

0 commit comments

Comments
 (0)