Measure how long TypeScript took to process each file for each web framework.
Prerequisted:
- TypeScript CLI (tsc)
- Bun
- Install dependencies:
bun install
- Generate necessary file:
bun prepare
- Measure how type inference (expected: 5-6 seconds)
bun trace
If trace command is successfully executed without interruption, you will see a new folder name trace is created with the following files:
- trace.json
- types.json
Head to perfetto, drag and drop trace.json into the page.
Once dropped, you should be able to visualize how long each file take to process.
Click on each slide, should revealed how long it took and the file path.
If you are not familiar with perfetto, please see Type Performance tracing
- Additionally, you may use dev commands to interspect documentation for each framework by using the following commands:
- bun dev:hono - to serve Hono server
- bun dev:elysia - to server Elysia server
Once server is started, head to http://localhost:3000/swagger