Commit 20e2f64
authored
chore: restructure bench package with variant-based benchmarks and fast-html support (#7272)
# Pull Request
## 📖 Description
Restructures the bench package to support multiple implementation variants per benchmark scenario. Each scenario (e.g. `basic`, `bind-text`, `repeat-create`) now contains subdirectories for each variant: `fe/` (FAST Element), `fhtml/` (fast-html client-side), and `fhtml-hydrate/` (fast-html SSR hydration).
This replaces the previous flat structure where benchmarks only targeted FAST Element. Several outdated or redundant benchmarks (`observable`, `render`, `repeat-reverse`, `repeat-shift`, `when-basic`, `when-conditional`, `when-switch`) and the shared `utilities.ts` helper have been removed in favor of focused, self-contained scenarios.
Other changes:
- Adds `@microsoft/fast-html` as a dependency for the bench package to support fast-html scenarios.
- Renames script commands to avoid conflicts with CI:
- `build` → `bundle`
- `test` → `bench`
- Adds a `signalDone()` harness helper for benchmarks that manage their own DOM setup (hydration scenarios).
- Adds a Vite `@bench-ssr` HTML directive for repeating SSR markup in `index.html` files.
- Improves benchmark runner output with per-iteration progress and median timing in the summary.
## 📑 Test Plan
Benchmarks have been run locally with `BENCH_DIST=true npm run bench` and all scenarios complete successfully.
## ✅ Checklist
### General
- [x] I have tested my changes.
- [x] I have updated the project documentation to reflect my changes.
- [x] I have read the [CONTRIBUTING](https://github.com/microsoft/fast/blob/main/CONTRIBUTING.md) documentation and followed the [standards](https://github.com/microsoft/fast/blob/main/CODE_OF_CONDUCT.md#our-standards) for this project.1 parent a5fcea8 commit 20e2f64
File tree
92 files changed
+1742
-802
lines changed- packages/bench
- server
- src
- attr-reflect
- fe
- fhtml-hydrate
- fhtml
- basic
- fe
- fhtml-hydrate
- fhtml
- bind-attr
- fe
- fhtml-hydrate
- fhtml
- bind-event
- fe
- fhtml-hydrate
- fhtml
- bind-text
- fe
- fhtml-hydrate
- fhtml
- dot-syntax
- fhtml-hydrate
- fhtml
- observable-notify/fe
- observable
- ref-slotted
- fe
- fhtml-hydrate
- fhtml
- render
- repeat-create
- fe
- fhtml-hydrate
- fhtml
- repeat-mutate
- fe
- fhtml-hydrate
- fhtml
- repeat-reverse
- repeat-shift
- when-basic
- when-conditional
- when-multi
- fe
- fhtml-hydrate
- fhtml
- when-switch
- when-toggle
- fe
- fhtml-hydrate
- fhtml
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
92 files changed
+1742
-802
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
| 42 | + | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
76 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
0 commit comments