Print times in a manner more consistent with the 1.3 compiler.

This allows us to more accurately compare and constrast times between that
compiler and the current one.
This commit is contained in:
Cyrus Najmabadi
2015-02-26 14:51:04 -08:00
parent 21fb559b53
commit 0be645943a
2 changed files with 17 additions and 1 deletions

View File

@@ -3,6 +3,7 @@
module ts {
/* @internal */ export var emitTime = 0;
/* @internal */ export var ioReadTime = 0;
export function createCompilerHost(options: CompilerOptions): CompilerHost {
var currentDirectory: string;
@@ -19,7 +20,9 @@ module ts {
function getSourceFile(fileName: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile {
try {
var start = new Date().getTime();
var text = sys.readFile(fileName, options.charset);
ioReadTime += new Date().getTime() - start;
}
catch (e) {
if (onError) {