Skip to content

Commit

Permalink
Measure getStaticProps, getServerSideProps
Browse files Browse the repository at this point in the history
  • Loading branch information
Timer committed Mar 2, 2020
1 parent 16672a4 commit c437a46
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/next/build/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,11 @@ export default async function build(dir: string, conf = null): Promise<void> {
eventBuildOptimize(pagePaths, {
durationInSeconds: analysisEnd[0],
staticPageCount: staticPages.size,
ssrPageCount: pagePaths.length - staticPages.size,
staticPropsPageCount: ssgPages.size,
serverPropsPageCount: serverPropsPages.size,
ssrPageCount:
pagePaths.length -
(staticPages.size + ssgPages.size + serverPropsPages.size),
hasStatic404: useStatic404,
})
)
Expand Down
2 changes: 2 additions & 0 deletions packages/next/telemetry/events/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ type EventBuildOptimized = {
durationInSeconds: number
totalPageCount: number
staticPageCount: number
staticPropsPageCount: number
serverPropsPageCount: number
ssrPageCount: number
hasDunderPages: boolean
hasTestPages: boolean
Expand Down

0 comments on commit c437a46

Please sign in to comment.