Track routes list build time

This commit is contained in:
Sam Carlton 2021-01-04 15:56:17 -06:00
parent f96e155d7f
commit 13742cad14

View file

@ -120,6 +120,9 @@ export default {
] ]
}, },
routes() { routes() {
const routesTimeName = 'Building Nuxt Routes'
console.time(routesTimeName)
return Promise.all([ return Promise.all([
...listsOptions, ...listsOptions,
videoListOptions videoListOptions
@ -230,6 +233,11 @@ export default {
return Array.from(allEndpointsSet) return Array.from(allEndpointsSet)
}) })
// Log the routes generation time
.then( result => {
console.timeEnd(routesTimeName)
return result
})
} }
}, },