You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,22 @@
3
3
This repo contains the infrastructure for TypeScript's benchmarking system, including build scripts
4
4
and the `ts-perf` CLI tool.
5
5
6
+
## Adding a benchmark
7
+
8
+
Public benchmarks are stored in the `cases` directory.
9
+
10
+
The simplest thing to do is to copy another benchmark; `cases/scenarios/vscode` is a good template.
11
+
12
+
Each benchmark consists of:
13
+
14
+
-`cases/scenarios/<name>/scenario.json` - This is JSON file which describes what `ts-perf` will run.
15
+
-`cases/scenarios/<name>/setup.sh` - This is an optional script that CI will run before benchmarking for setting up the benchmark.
16
+
This is where you would clone repos, install dependencies, etc, whatever is needed to run `tsc`.
17
+
-`cases/solutions/<name>` (or an ignored dir of the same name in `cases/solutions/.gitignore`) - This is where the source code for the benchmark is stored.
18
+
This may be code that's checked in the repo, but preferably the directory is `.gitignore`'d and `setup.sh` script clones code here.
19
+
20
+
After these files are created, they must be added to `scenarioConfig` in `scripts/src/generateMatrix.ts` to be run in CI.
21
+
6
22
## Contributing
7
23
8
24
This project welcomes contributions and suggestions. Most contributions require you to agree to a
0 commit comments