Merge pull request #2142 from Microsoft/timeReporting

Ensure that the cost for typechecking is not billed to the emit portion of the compiler.
This commit is contained in:
CyrusNajmabadi 2015-02-25 17:02:47 -08:00
commit a196c77353

View file

@ -177,10 +177,15 @@ module ts {
return { diagnostics: [], sourceMaps: undefined, emitSkipped: true };
}
// Create the emit resolver outside of the "emitTime" tracking code below. That way
// any cost associated with it (like type checking) are appropriate associated with
// the type-checking counter.
var emitResolver = getDiagnosticsProducingTypeChecker().getEmitResolver(sourceFile);
var start = new Date().getTime();
var emitResult = emitFiles(
getDiagnosticsProducingTypeChecker().getEmitResolver(sourceFile),
emitResolver,
getEmitHost(writeFileCallback),
sourceFile);