> ## Documentation Index
> Fetch the complete documentation index at: https://codspeed.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Writing Benchmarks in JavaScript and TypeScript

There are multiple ways to integrate CodSpeed with your JS/TS codebase:

> [card] [vitest (recommended)](https://codspeed.io/docs/benchmarks/nodejs/vitest.md)
>
> The most convenient way to run your Node.js benchmarks

> [card] [tinybench](https://codspeed.io/docs/benchmarks/nodejs/tinybench.md)
>
> A lightweight benchmarking library with a simple API

> [card] [benchmark.js](https://codspeed.io/docs/benchmarks/nodejs/benchmarkjs.md)
>
> The legacy benchmarking library for JavaScript

We recommend using the `vitest` plugin as it is the easiest to use and has the
most features.

If you are already using `benchmark.js` or `tinybench`, check out their
respective plugins as they require only a small wrapping to work with CodSpeed.

To benchmark a user flow end-to-end, use the Playwright integration:

> [card] [Playwright](https://codspeed.io/docs/benchmarks/nodejs/playwright.md)
>
> Drive an app through Playwright and measure real flows.

## Supported Node.js versions

Each Node.js version is supported by a range of `@codspeed/*` packages versions,
which are all released under the same version number:

| Node.js version | `@codspeed/*` packages versions |
| :- | :- |
| 26 | `>=6.0.0` |
| 24 | `>=6.0.0` |
| 22 | `>=6.0.0` |
| 20 | `>=2.0.0 <6.0.0` |
| 18 | `>=2.0.0 <6.0.0` |
| 16 | `>=1.0.0 <5.0.0` |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.