Skip to content

Commit d5574a5

Browse files
committed
chore: update bench test
1 parent 004983c commit d5574a5

File tree

3 files changed

+18
-5
lines changed

3 files changed

+18
-5
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@
5555
"radix3": "^1.1.2",
5656
"typescript": "^5.5.3",
5757
"unbuild": "^3.0.0-rc.6",
58-
"vitest": "^1.6.0"
58+
"vitest": "^1.6.0",
59+
"rou3-release": "npm:rou3@0.2.0"
5960
},
6061
"packageManager": "pnpm@9.5.0"
6162
}

pnpm-lock.yaml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/bench/spec.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
import * as rou3 from "../../src";
1+
// import * as rou3Src from "../../src";
2+
import * as rou3Dist from "../../dist/index.mjs";
3+
import * as rou3Release from "rou3-release";
24

35
// https://github.com/pi0/web-framework-benchmarks
46
// (based on hono router benchmarks)
@@ -69,12 +71,14 @@ export const requests = [
6971

7072
export function createBenchApps() {
7173
return [
72-
["rou3", createRou3Router()],
73-
["fastest", createFastestRouter()],
74+
// ["rou3-src", createRou3Router(rou3Src)],
75+
["rou3-dist", createRou3Router(rou3Dist)],
76+
["rou3-release", createRou3Router(rou3Release)],
77+
["maximum", createFastestRouter()],
7478
] as const;
7579
}
7680

77-
export function createRou3Router() {
81+
export function createRou3Router(rou3: typeof import("rou3")) {
7882
const router = rou3.createRouter();
7983
for (const route of routes) {
8084
rou3.addRoute(

0 commit comments

Comments
 (0)