From 1a22e06062226ec7c59d73942735b9d7250f073d Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Thu, 9 May 2024 09:33:16 -0700 Subject: [PATCH] chore: only patch callIds when there are multiple trace files (#30721) --- packages/trace-viewer/src/ui/modelUtil.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/trace-viewer/src/ui/modelUtil.ts b/packages/trace-viewer/src/ui/modelUtil.ts index 39061c8c10..7c9e6e1237 100644 --- a/packages/trace-viewer/src/ui/modelUtil.ts +++ b/packages/trace-viewer/src/ui/modelUtil.ts @@ -178,7 +178,7 @@ function mergeActionsAndUpdateTiming(contexts: ContextEntry[]) { // traces from more than one file we make the ids unique across the // files. The code does not update snapshot ids as they are always // retrieved from a particular trace file. - if (traceFileToContexts.size) + if (traceFileToContexts.size > 1) makeCallIdsUniqueAcrossTraceFiles(contexts, ++traceFileId); // Align action times across runner and library contexts within each trace file. const map = mergeActionsAndUpdateTimingSameTrace(contexts);