-
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into improve-generics-and-fixes
- Loading branch information
Showing
51 changed files
with
2,650 additions
and
1,627 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,6 +45,18 @@ jobs: | |
name: latest-checker | ||
path: previous-ezno | ||
|
||
- name: Set compilers | ||
id: compilers | ||
shell: bash | ||
run: | | ||
if [ -d "previous-ezno" ]; then | ||
echo "::notice::Comparing against previous" | ||
echo "BINARIES=./target/release/ezno,./previous-ezno/ezno" >> "$GITHUB_OUTPUT" | ||
else | ||
echo "::notice::Running singularly" | ||
echo "BINARIES=./target/release/ezno" >> "$GITHUB_OUTPUT" | ||
fi | ||
- name: Run checker performance | ||
shell: bash | ||
run: | | ||
|
@@ -56,7 +68,7 @@ jobs: | |
echo "### Checking | ||
\`\`\`shell | ||
$(hyperfine -i './target/release/ezno check demo.tsx') | ||
$(hyperfine -i -L compiler ${{ steps.compilers.outputs.BINARIES }} '{compiler} check demo.tsx') | ||
\`\`\`" >> $GITHUB_STEP_SUMMARY | ||
echo "<details> | ||
|
@@ -87,17 +99,34 @@ jobs: | |
$diagnostics | ||
\`\`\` | ||
</details> | ||
<details> | ||
<summary>Statistics</summary> | ||
\`\`\` | ||
$statistics | ||
\`\`\` | ||
</details> | ||
" >> $GITHUB_STEP_SUMMARY | ||
# Get just statistics: `| rg "Diagnostics:" -A 100` | ||
if [ -d "previous-ezno" ]; then | ||
OUT=$(./previous-ezno/ezno check demo.tsx --timings --max-diagnostics all 2>&1 || true) | ||
$base_statistics=$(echo $OUT | rg "Diagnostics:" -A 100) | ||
echo " | ||
<details> | ||
<summary>Statistics</summary> | ||
\`\`\` | ||
$statistics | ||
\`\`\` | ||
against base | ||
\`\`\` | ||
$base_statistics | ||
\`\`\` | ||
against base | ||
</details> | ||
" >> $GITHUB_STEP_SUMMARY | ||
else | ||
echo "<details> | ||
<summary>Statistics</summary> | ||
\`\`\` | ||
$statistics | ||
\`\`\` | ||
</details>" >> $GITHUB_STEP_SUMMARY | ||
fi | ||
- name: Run checker performance w/staging | ||
shell: bash | ||
|
@@ -109,7 +138,8 @@ jobs: | |
cargo run -p ezno-parser --example code_blocks_to_script all.md --comment-headers --out ./all.tsx | ||
./target/release/ezno check all.tsx --timings || true | ||
hyperfine -i './target/release/ezno check all.tsx' | ||
hyperfine -i -L compiler ${{ steps.compilers.outputs.BINARIES }} '{compiler} check all.tsx' | ||
echo "::endgroup::" | ||
- name: Run checker performance on large file | ||
|
@@ -125,40 +155,52 @@ jobs: | |
done | ||
./target/release/ezno check large.tsx --timings --max-diagnostics 0 || true | ||
hyperfine -i './target/release/ezno check large.tsx' | ||
hyperfine -i -L compiler ${{ steps.compilers.outputs.BINARIES }} '{compiler} check large.tsx' | ||
echo "::endgroup::" | ||
- name: Valgrind | ||
- name: Valgrind and callgrind | ||
shell: bash | ||
continue-on-error: true | ||
run: | | ||
echo "::group::Callgrind" | ||
valgrind --tool=callgrind --callgrind-out-file=cpu-out ./target/release/ezno check demo.tsx | true | ||
echo "CPU usage:" | ||
head -n100 cpu-out | ||
echo "::endgroup::" | ||
IFS=',' read -ra ITEMS <<< ${{ steps.compilers.outputs.BINARIES }} | ||
echo "::group::Valgrind" | ||
valgrind --log-file=memory-out ./target/release/ezno check demo.tsx | true | ||
echo "Memory usage:" | ||
cat memory-out | ||
echo "::endgroup::" | ||
for compiler in ${ITEMS[@]}; do | ||
echo "::group::Running $compiler" | ||
echo "::group::Callgrind" | ||
valgrind --tool=callgrind --callgrind-out-file=cpu-out $compiler check demo.tsx | true | ||
echo "CPU usage:" | ||
head -n100 cpu-out | ||
echo "::endgroup::" | ||
echo "::group::Valgrind" | ||
valgrind --log-file=memory-out $compiler check demo.tsx | true | ||
echo "Memory usage:" | ||
cat memory-out | ||
echo "::endgroup::" | ||
|
||
echo "::endgroup::" | ||
done | ||
|
||
- name: Run parsing & stringing (minfied) benchmarks | ||
shell: bash | ||
continue-on-error: true | ||
run: | | ||
strings=( | ||
"https://esm.sh/v128/[email protected]/es2022/react-dom.mjs" | ||
"https://esm.sh/v135/[email protected]/es2022/typescript.mjs" | ||
) | ||
# Currently broken "https://esm.sh/v135/[email protected]/es2022/typescript.mjs" | ||
for url in "${strings[@]}"; do | ||
curl -sS $url > input.js | ||
echo "--- debug: $url ---" | ||
cargo run -p ezno-parser --example parse input.js --timings --render-timings | ||
echo "--- release: $url ---" | ||
cargo run -p ezno-parser --release --example parse input.js --timings --render-timings | ||
hyperfine "./target/debug/examples/parse input.js" "./target/release/examples/parse input.js" | ||
# TODO copy expression | ||
curl -sS $url > input.js | ||
echo "::group::Comparison" | ||
hyperfine \ | ||
-L compiler ${{ steps.compilers.outputs.BINARIES }} \ | ||
'{compiler} ast-explorer full input.js --timings' | ||
echo "::endgroup::" | ||
done | ||
- name: Upload checker | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.