Skip to content

Commit a3ecb9b

Browse files
committed
fix: reverse order in which TTR/TTI is emitted
1 parent 0664b41 commit a3ecb9b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/ActionLog.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -674,19 +674,19 @@ export class ActionLog<CustomMetadata extends Record<string, unknown>> {
674674
this.lastStage,
675675
)
676676
} else if (lastRenderAction) {
677+
ttr = performanceMeasure(
678+
`${this.id}/ttr`,
679+
firstAction.entry.startMark ?? firstAction.entry,
680+
lastRenderAction.entry.endMark ?? lastRenderAction.entry,
681+
detail,
682+
)
677683
// add a measure so we can use it in Lighthouse runs
678684
tti = performanceMeasure(
679685
`${this.id}/tti`,
680686
firstAction.entry.startMark ?? firstAction.entry,
681687
lastAction.entry.endMark ?? lastAction.entry,
682688
detail,
683689
)
684-
ttr = performanceMeasure(
685-
`${this.id}/ttr`,
686-
firstAction.entry.startMark ?? firstAction.entry,
687-
lastRenderAction.entry.endMark ?? lastRenderAction.entry,
688-
detail,
689-
)
690690
}
691691

692692
const reportArgs: ReportArguments<CustomMetadata> = {

0 commit comments

Comments
 (0)