From 9ad9ec984e1c7bd373329977a4f6f27cd28f27e3 Mon Sep 17 00:00:00 2001 From: Andrew Casey Date: Wed, 21 Oct 2020 10:38:09 -0700 Subject: [PATCH] Add tracepoint in resolveTypeReferenceDirectiveNamesWorker --- src/compiler/program.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 984e3d45279..2572ed5f7e1 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -1060,12 +1060,14 @@ namespace ts { function resolveTypeReferenceDirectiveNamesWorker(typeDirectiveNames: string[], containingFile: string | SourceFile): readonly (ResolvedTypeReferenceDirective | undefined)[] { if (!typeDirectiveNames.length) return []; - performance.mark("beforeResolveTypeReference"); const containingFileName = !isString(containingFile) ? getNormalizedAbsolutePath(containingFile.originalFileName, currentDirectory) : containingFile; const redirectedReference = !isString(containingFile) ? getRedirectReferenceForResolution(containingFile) : undefined; + tracing.begin(tracing.Phase.Program, "resolveTypeReferenceDirectiveNamesWorker", { containingFileName }); + performance.mark("beforeResolveTypeReference"); const result = actualResolveTypeReferenceDirectiveNamesWorker(typeDirectiveNames, containingFileName, redirectedReference); performance.mark("afterResolveTypeReference"); performance.measure("ResolveTypeReference", "beforeResolveTypeReference", "afterResolveTypeReference"); + tracing.end(); return result; }