Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
SyMind committed Dec 18, 2024
1 parent 75dbfb1 commit 2901e34
Show file tree
Hide file tree
Showing 6 changed files with 578 additions and 53 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ jobs:
uses: CodSpeedHQ/action@v3
timeout-minutes: 30
with:
working-directory: "packages/bench"
working-directory: packages/bench
run: pnpm run bench
token: ${{ secrets.CODSPEED_TOKEN }}

Expand Down
14 changes: 14 additions & 0 deletions packages/bench/arco-pro.bench.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { bench, describe } from "vitest";

function fibonacci(n: number): number {
if (n < 2) {
return n;
}
return fibonacci(n - 1) + fibonacci(n - 2);
}

describe("arco pro", () => {
bench("build with development mode", () => {
fibonacci(10);
});
});
22 changes: 0 additions & 22 deletions packages/bench/index.js

This file was deleted.

6 changes: 3 additions & 3 deletions packages/bench/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
"license": "MIT",
"type": "module",
"scripts": {
"bench": "node index.js"
"bench": "vitest bench --run"
},
"devDependencies": {
"@codspeed/tinybench-plugin": "^4.0.0",
"@codspeed/vitest-plugin": "^4.0.0",
"@rspack/cli": "workspace:*",
"@rspack/core": "workspace:*",
"tinybench": "^3.0.7"
"vitest": "^2.1.8"
}
}
9 changes: 9 additions & 0 deletions packages/bench/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import codspeedPlugin from "@codspeed/vitest-plugin";
import { defineConfig } from "vitest/config";

export default defineConfig({
plugins: [codspeedPlugin()],
test: {
fileParallelism: true
}
});
Loading

0 comments on commit 2901e34

Please sign in to comment.