Skip to content

Commit

Permalink
Remove unused benchmarks (#6396)
Browse files Browse the repository at this point in the history
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
  • Loading branch information
bluwy and sarah11918 authored Mar 4, 2023
1 parent cd84699 commit 9d236c9
Show file tree
Hide file tree
Showing 18 changed files with 11 additions and 465 deletions.
19 changes: 11 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,22 +121,25 @@ pnpm exec changeset

### Running benchmarks

We have benchmarks to keep performance under control. You can run these by running (from the project root):
We have benchmarks to keep performance under control. They are located in the `benchmarks` directory, and it exposes a CLI you can use to run them.

You can run all available benchmarks sequentially by running (from the project root):

```shell
pnpm run benchmark --filter astro
pnpm run benchmark
```

Which will fail if the performance has regressed by **10%** or more.

To update the times cd into the `packages/astro` folder and run the following:
To run a specific benchmark only, you can add the name of the benchmark after the command:

```shell
node test/benchmark/build.bench.js --save
node test/benchmark/dev.bench.js --save
pnpm run benchmark memory
```

Which will update the build and dev benchmarks.
Use `pnpm run benchmark --help` to see all available options.

To run these benchmarks in a PR on GitHub instead of using the CLI, you can comment `!bench`. The benchmarks will run on both the PR branch and the `main` branch, and the results will be posted as a new comment.

To run only a specific benchmark on CI, add its name after the command in your comment, for example, `!bench memory`.

## Code Structure

Expand Down
1 change: 0 additions & 1 deletion packages/astro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@
"build:ci": "pnpm run prebuild && astro-scripts build \"src/**/*.ts\"",
"dev": "astro-scripts dev --prebuild \"src/runtime/server/astro-island.ts\" --prebuild \"src/runtime/client/{idle,load,media,only,visible}.ts\" \"src/**/*.ts\"",
"postbuild": "astro-scripts copy \"src/**/*.astro\"",
"benchmark": "node test/benchmark/dev.bench.js && node test/benchmark/build.bench.js",
"test:unit": "mocha --exit --timeout 30000 ./test/units/**/*.test.js",
"test:unit:match": "mocha --exit --timeout 30000 ./test/units/**/*.test.js -g",
"test": "pnpm run test:unit && mocha --exit --timeout 20000 --ignore **/lit-element.test.js && mocha --timeout 20000 **/lit-element.test.js",
Expand Down
71 changes: 0 additions & 71 deletions packages/astro/test/benchmark/benchmark.js

This file was deleted.

4 changes: 0 additions & 4 deletions packages/astro/test/benchmark/build-cached.json

This file was deleted.

4 changes: 0 additions & 4 deletions packages/astro/test/benchmark/build-uncached.json

This file was deleted.

85 changes: 0 additions & 85 deletions packages/astro/test/benchmark/build.bench.js

This file was deleted.

4 changes: 0 additions & 4 deletions packages/astro/test/benchmark/dev-server-cached.json

This file was deleted.

4 changes: 0 additions & 4 deletions packages/astro/test/benchmark/dev-server-uncached.json

This file was deleted.

63 changes: 0 additions & 63 deletions packages/astro/test/benchmark/dev.bench.js

This file was deleted.

7 changes: 0 additions & 7 deletions packages/astro/test/benchmark/simple/astro.config.mjs

This file was deleted.

12 changes: 0 additions & 12 deletions packages/astro/test/benchmark/simple/package.json

This file was deleted.

19 changes: 0 additions & 19 deletions packages/astro/test/benchmark/simple/server.mjs

This file was deleted.

This file was deleted.

Loading

0 comments on commit 9d236c9

Please sign in to comment.