Skip to content

Commit ea7693d

Browse files
committed
More testing
1 parent 6837283 commit ea7693d

File tree

3 files changed

+28
-21
lines changed

3 files changed

+28
-21
lines changed

.github/workflows/benchmark.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ jobs:
4343
~/.cargo/registry/cache/
4444
~/.cargo/git/db/
4545
~/home/linuxbrew/
46-
target/
46+
**/target/release/*
47+
**/examples/*
48+
**/built/local/*
49+
**/Cargo.toml
4750
key: ${{ runner.os }}-${{ hashFiles('**/Cargo.lock', 'run.sh') }}
4851

4952
- run: mkdir -p ${{ env.ARTIFACTS_FOLDER }}

benchmarks/ts-type-checkers/run.sh

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ export NO_COLOR=1
44
echo "## Example file `demo.ts`
55
66
<details>
7-
<summary>Output</summary>
7+
<summary>Content</summary>
88
9-
\`\`\`
9+
\`\`\`ts
1010
$(cat demo.ts)
1111
\`\`\`
1212
</details>
@@ -41,27 +41,15 @@ echo "::group::Run benchmarks"
4141

4242
echo "## Benchmark files" >> $GITHUB_STEP_SUMMARY
4343

44-
./tsc-go/built/local/tsgo --help
45-
./tsc-go/built/local/tsgo tsc --help
46-
47-
hyperfine -i \
48-
'./ezno/target/release/ezno check ./demo.ts' \
49-
'./tsc-go/built/local/tsgo tsc -skipLibCheck ./demo.ts' \
50-
'tsc --pretty --skipLibCheck --noEmit --jsx preserve ./demo.ts'
51-
52-
hyperfine -i \
53-
'./ezno/target/release/ezno check ./large.ts' \
54-
'./tsc-go/built/local/tsgo tsc -skipLibCheck ./large.ts' \
55-
'tsc --pretty --skipLibCheck --noEmit --jsx preserve ./large.ts'
56-
5744
# Ezno and TSC
5845
echo "##### `demo.ts`
5946
6047
\`\`\`
6148
$(hyperfine -i \
6249
'./ezno/target/release/ezno check ./demo.ts' \
63-
'./tsc-go/built/local/tsgo tsc -skipLibCheck ./demo.ts' \
64-
'tsc --pretty --skipLibCheck --noEmit --jsx preserve ./demo.ts'
50+
'./tsc-go/built/local/tsgo tsc -skipLibCheck -pretty -noEmit ./demo.ts' \
51+
'./tsc-go/built/local/tsgo tsc -skipLibCheck -pretty -noEmit -singleThreaded ./demo.ts' \
52+
'tsc --pretty --skipLibCheck --noEmit ./demo.ts'
6553
)
6654
\`\`\`
6755
@@ -70,19 +58,32 @@ $(hyperfine -i \
7058
\`\`\`
7159
$(hyperfine -i \
7260
'./ezno/target/release/ezno check ./large.ts' \
73-
'./tsc-go/built/local/tsgo tsc -skipLibCheck ./large.ts' \
74-
'tsc --pretty --skipLibCheck --noEmit --jsx preserve ./large.ts'
61+
'./tsc-go/built/local/tsgo tsc -skipLibCheck -pretty -noEmit ./large.ts' \
62+
'./tsc-go/built/local/tsgo tsc -skipLibCheck -pretty -noEmit -singleThreaded ./large.ts' \
63+
'tsc --pretty --skipLibCheck --noEmit ./large.ts'
7564
)
7665
\`\`\`
7766
" >> $GITHUB_STEP_SUMMARY
7867

7968
### Valgrind
8069
valgrind --log-file="ezno-mem.txt" ./ezno/target/release/ezno check ./demo.ts
8170
valgrind --log-file="tsc-go-mem.txt" ./tsc-go/built/local/tsgo tsc -skipLibCheck ./demo.ts
82-
valgrind --log-file="tsc-mem.txt" tsc --pretty --skipLibCheck --noEmit --jsx preserve ./demo.ts
71+
valgrind --log-file="tsc-mem.txt" tsc --pretty --skipLibCheck --noEmit ./demo.ts
8372

8473
echo "## Memory usage
8574
75+
<details>
76+
<summary>Comparison</summary>
77+
78+
\`\`\`
79+
$(./incredible-serious-memory-benchmark-tool './ezno/target/release/ezno check ./large.ts' \
80+
'./tsc-go/built/local/tsgo tsc -skipLibCheck ./large.ts' \
81+
'tsc --pretty --skipLibCheck --noEmit ./large.ts')
82+
\`\`\`
83+
</details>
84+
85+
Valgrind
86+
8687
<details>
8788
<summary>ezno memory</summary>
8889

benchmarks/ts-type-checkers/setup.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ echo "::group::Get tools"
33
brew install hyperfine
44
sudo apt-get install valgrind
55

6+
gh release download -R andrewrk/poop --pattern 'x86-linux-*' -o incredible-serious-memory-benchmark-tool
7+
chmod +x incredible-serious-memory-benchmark-tool
8+
69
echo "::endgroup::"
710

811
# ---

0 commit comments

Comments
 (0)