From 6ffac18284f7911c8faf27356cfe21065a1036c4 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Thu, 9 May 2024 14:30:00 -0700 Subject: [PATCH] stdio time --- packages/trace-viewer/src/ui/modelUtil.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/trace-viewer/src/ui/modelUtil.ts b/packages/trace-viewer/src/ui/modelUtil.ts index a6187e29fe..200a2e9271 100644 --- a/packages/trace-viewer/src/ui/modelUtil.ts +++ b/packages/trace-viewer/src/ui/modelUtil.ts @@ -224,7 +224,8 @@ function mergeActionsAndUpdateTimingSameTrace(contexts: ContextEntry[]) { // 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. const delta = monotonicTimeDeltaBetweenRunnerAndLibrary(nonPrimaryContexts, map); - adjustMonotonicTime(nonPrimaryContexts, delta); + if (delta) + adjustMonotonicTime(nonPrimaryContexts, delta); const nonPrimaryIdToPrimaryId = new Map(); for (const context of nonPrimaryContexts) { @@ -265,6 +266,8 @@ function adjustMonotonicTime(nonPrimaryContexts: ContextEntry[], monotonicTimeDe } for (const event of context.events) event.time += monotonicTimeDelta; + for (const event of context.stdio) + event.timestamp += monotonicTimeDelta; for (const page of context.pages) { for (const frame of page.screencastFrames) frame.timestamp += monotonicTimeDelta;