Skip to content

Commit

Permalink
chore: delete global folder in benchmarks (#5523)
Browse files Browse the repository at this point in the history
**What's the problem this PR addresses?**

-
yarnpkg/berry@07b4ceb
changed the metadata cache structure but didn't update the benchmark
script to match.
- We're not removing the `$globalFolder/index` folder so
`install-full-cold` is skipping some work.

Follow-up to yarnpkg/berry#5491

**How did you fix it?**

Clear the entire global folder.

**Checklist**
- [x] I have read the [Contributing
Guide](https://yarnpkg.com/advanced/contributing).
- [x] I have set the packages that need to be released for my changes to
be effective.
- [x] I will check that all automated PR checks pass before the PR gets
reviewed.
  • Loading branch information
merceyz committed Jun 24, 2023
1 parent b18410c commit 033e1df
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions scripts/bench-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,8 @@ case $PACKAGE_MANAGER in
;;
yarn)
setup-yarn2
# TODO: Use `yarn cache clean` instead of manually removing the npm metadata once the feature is implemented
bench install-full-cold \
--prepare 'rm -rf .yarn .pnp.* yarn.lock "$(yarn config get globalFolder)/npm-metadata" && yarn cache clean --all' \
--prepare 'rm -rf .yarn .pnp.* yarn.lock .yarn-global' \
'yarn install'
bench install-cache-only \
--prepare 'rm -rf .yarn .pnp.* yarn.lock' \
Expand All @@ -96,9 +95,8 @@ case $PACKAGE_MANAGER in
yarn-nm)
setup-yarn2
setup-yarn2-nm
# TODO: Use `yarn cache clean` instead of manually removing the npm metadata once the feature is implemented
bench install-full-cold \
--prepare 'rm -rf .yarn node_modules yarn.lock "$(yarn config get globalFolder)/npm-metadata" && yarn cache clean --all' \
--prepare 'rm -rf .yarn node_modules yarn.lock .yarn-global' \
'yarn install'
bench install-cache-only \
--prepare 'rm -rf .yarn node_modules yarn.lock' \
Expand All @@ -113,9 +111,8 @@ case $PACKAGE_MANAGER in
yarn-pnpm)
setup-yarn2
setup-yarn2-pnpm
# TODO: Use `yarn cache clean` instead of manually removing the npm metadata once the feature is implemented
bench install-full-cold \
--prepare 'rm -rf .yarn node_modules yarn.lock "$(yarn config get globalFolder)/npm-metadata" && yarn cache clean --all' \
--prepare 'rm -rf .yarn node_modules yarn.lock .yarn-global' \
'yarn install'
bench install-cache-only \
--prepare 'rm -rf .yarn node_modules yarn.lock' \
Expand Down

0 comments on commit 033e1df

Please sign in to comment.