diff --git a/src/services/compiler/diagnostics.ts b/src/services/compiler/diagnostics.ts index d759c8bf014..5114f83f9e5 100644 --- a/src/services/compiler/diagnostics.ts +++ b/src/services/compiler/diagnostics.ts @@ -17,31 +17,11 @@ module TypeScript { export interface Logger { - information(): boolean; - debug(): boolean; - warning(): boolean; - error(): boolean; - fatal(): boolean; log(s: string): void; } export class NullLogger implements Logger { - public information(): boolean { return false; } - public debug(): boolean { return false; } - public warning(): boolean { return false; } - public error(): boolean { return false; } - public fatal(): boolean { return false; } public log(s: string): void { } } - - export function timeFunction(logger: Logger, funcDescription: string, func: () => any): any { - var start = (new Date()).getTime(); - var result = func(); - var end = (new Date()).getTime(); - if (logger.information()) { - logger.log(funcDescription + " completed in " + (end - start) + " msec"); - } - return result; - } } \ No newline at end of file diff --git a/src/services/formatting/rulesProvider.ts b/src/services/formatting/rulesProvider.ts index 608ee97254a..90b11f01a9b 100644 --- a/src/services/formatting/rulesProvider.ts +++ b/src/services/formatting/rulesProvider.ts @@ -40,8 +40,8 @@ module TypeScript.Services.Formatting { public ensureUpToDate(options: ts.FormatCodeOptions) { if (this.options == null || !ts.compareDataObjects(this.options, options)) { - var activeRules: Rule[] = TypeScript.timeFunction(this.logger, "RulesProvider: createActiveRules()", () => { return this.createActiveRules(options); }); - var rulesMap: RulesMap = TypeScript.timeFunction(this.logger, "RulesProvider: RulesMap.create()", () => { return RulesMap.create(activeRules); }); + var activeRules = this.createActiveRules(options); + var rulesMap = RulesMap.create(activeRules); this.activeRules = activeRules; this.rulesMap = rulesMap; diff --git a/src/services/services.ts b/src/services/services.ts index 0dab3cf5a3e..ce99f9616b1 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -432,11 +432,6 @@ module ts { } export interface Logger { - information(): boolean; - debug(): boolean; - warning(): boolean; - error(): boolean; - fatal(): boolean; log(s: string): void; } diff --git a/src/services/shims.ts b/src/services/shims.ts index acb67b843bb..fe5003479ca 100644 --- a/src/services/shims.ts +++ b/src/services/shims.ts @@ -307,26 +307,6 @@ module ts { constructor(private shimHost: LanguageServiceShimHost) { } - public information(): boolean { - return this.shimHost.information(); - } - - public debug(): boolean { - return this.shimHost.debug(); - } - - public warning(): boolean { - return this.shimHost.warning(); - } - - public error(): boolean { - return this.shimHost.error(); - } - - public fatal(): boolean { - return this.shimHost.fatal(); - } - public log(s: string): void { this.shimHost.log(s); }