Skip to content

Commit

Permalink
Merge pull request #87 from line/feat/benchmark-vue-core
Browse files Browse the repository at this point in the history
chore: add benchmark for vue core
  • Loading branch information
kazushisan authored Dec 10, 2024
2 parents 3154bcd + 771fcff commit de92653
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions benchmark/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
react-hook-form/
taxonomy/
excalidraw/
vue_core/
25 changes: 25 additions & 0 deletions benchmark/vue_core.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
if [ ! -d "vue_core" ]; then
git clone --depth=1 -b v3.5.13 git@github.com:vuejs/core.git vue_core
cd vue_core
cat > knip.json << EOF
{
"$schema": "https://unpkg.com/knip@5/schema.json",
"entry": [
"**/src/index.ts",
"**/src/cli.ts",
"**/src/runtime.ts",
"**/src/esm-runtime.ts"
],
"project": ["packages/src/**/*.ts", "packages/global.d.ts"],
"include": ["files", "exports", "types", "nsExports", "nsTypes"]
}
EOF
## we remove the packages-private folder because there's an import that knip can't resolve and it's not necessary for the benchmark
rm -rf packages-private
pnpm i -w knip@5.39.2
else
cd vue_core
fi

npx tsr --version
hyperfine --warmup 3 --runs 5 -i "npx tsr -p tsconfig.build.json '.+/src/.*(index|runtime|cli)\.ts$'" "npx knip"

0 comments on commit de92653

Please # to comment.