mirror of
https://github.com/vercel/next.js.git
synced 2026-09-20 02:25:18 +08:00
48b2976ed2
### 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.
11 lines
233 B
JavaScript
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)
|
|
}
|