mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
### 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)
|
|
}
|