Mercurial
comparison benchmark/bun-http-framework-benchmark/src/bun/vixeny.ts @ 183:a8976a008a9d
[BenchMark] Added bun bench mark to test seoboe vs other popular benchmarks.
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Fri, 23 Jan 2026 21:19:08 -0800 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 179:8d17f6e6e290 | 183:a8976a008a9d |
|---|---|
| 1 import { wrap } from 'vixeny' | |
| 2 | |
| 3 Bun.serve({ | |
| 4 fetch: wrap()() | |
| 5 .petitionWithoutCTX({ | |
| 6 path: '/', | |
| 7 r: () => new Response('Hi') | |
| 8 }) | |
| 9 .stdPetition({ | |
| 10 path: '/id/:id', | |
| 11 headings: { | |
| 12 // This doesn't work for some reason | |
| 13 headers: { | |
| 14 'x-powered-by': 'benchmark' | |
| 15 } | |
| 16 }, | |
| 17 param:{ | |
| 18 unique: true | |
| 19 }, | |
| 20 query: { | |
| 21 unique: true, | |
| 22 name: "name" | |
| 23 }, | |
| 24 f: (f) => f.param + ' ' + f.query | |
| 25 }) | |
| 26 .stdPetition({ | |
| 27 path: '/json', | |
| 28 method: 'POST', | |
| 29 headings: { | |
| 30 headers: { | |
| 31 'content-type': 'application/json' | |
| 32 } | |
| 33 }, | |
| 34 f: async (f) => JSON.stringify(await f.req.json()) | |
| 35 }) | |
| 36 .compose() | |
| 37 }) |