stdio time

This commit is contained in:
Yury Semikhatsky 2024-05-09 14:30:00 -07:00
parent c29cf9fd4f
commit 6ffac18284

View file

@ -224,7 +224,8 @@ function mergeActionsAndUpdateTimingSameTrace(contexts: ContextEntry[]) {
// Step aka non-isPrimary contexts have startTime/endTime are client-side times. // Step aka non-isPrimary contexts have startTime/endTime are client-side times.
// Adjust expect startTime/endTime on non-primary contexts to put them on a single timeline. // Adjust expect startTime/endTime on non-primary contexts to put them on a single timeline.
const delta = monotonicTimeDeltaBetweenRunnerAndLibrary(nonPrimaryContexts, map); const delta = monotonicTimeDeltaBetweenRunnerAndLibrary(nonPrimaryContexts, map);
adjustMonotonicTime(nonPrimaryContexts, delta); if (delta)
adjustMonotonicTime(nonPrimaryContexts, delta);
const nonPrimaryIdToPrimaryId = new Map<string, string>(); const nonPrimaryIdToPrimaryId = new Map<string, string>();
for (const context of nonPrimaryContexts) { for (const context of nonPrimaryContexts) {
@ -265,6 +266,8 @@ function adjustMonotonicTime(nonPrimaryContexts: ContextEntry[], monotonicTimeDe
} }
for (const event of context.events) for (const event of context.events)
event.time += monotonicTimeDelta; event.time += monotonicTimeDelta;
for (const event of context.stdio)
event.timestamp += monotonicTimeDelta;
for (const page of context.pages) { for (const page of context.pages) {
for (const frame of page.screencastFrames) for (const frame of page.screencastFrames)
frame.timestamp += monotonicTimeDelta; frame.timestamp += monotonicTimeDelta;