Files
vercel__next.js/bench/module-cost/pages/api/commonjs.js
Tobias Koppers 48b2976ed2 Turbopack: add module cost benchmark (#81530)
### What?

Add a benchmark that requires/imports nearly 10k of empty modules.

Measures load and execution time for these modules.

Might also be useful to measure the compile overhead of modules.
2025-07-11 14:34:38 +02:00

11 lines
233 B
JavaScript

import { measure } from '../../lib/measure'
export default async function handler(req, res) {
const result = await measure(
'pages api commonjs',
() => import('../../lib/commonjs.js')
)
res.status(200).json(result)
}