Skip to content

Latest commit

 

History

History
39 lines (28 loc) · 1.13 KB

README.md

File metadata and controls

39 lines (28 loc) · 1.13 KB

Type Stress benchmark

Measure how long TypeScript took to process each file for each web framework.

Prerequisted:

  • TypeScript CLI (tsc)
  • Bun
  1. Install dependencies:
bun install
  1. Generate necessary file:
bun prepare
  1. 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

  1. 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