diff options
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Analyzer.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Analyzer.scala | 30 |
1 files changed, 3 insertions, 27 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Analyzer.scala b/src/compiler/scala/tools/nsc/typechecker/Analyzer.scala index f341dd0df9..16287bfc45 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Analyzer.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Analyzer.scala @@ -46,34 +46,10 @@ trait Analyzer extends AnyRef def newPhase(_prev: Phase): StdPhase = new StdPhase(_prev) { resetTyper() override def run { - val start = System.nanoTime() + val start = if (util.Statistics.enabled) System.nanoTime() else 0L currentRun.units foreach applyPhase - /* - typerTime += System.nanoTime() - start - def show(time: Long) = "%2.1f".format(time.toDouble / typerTime * 100)+" / "+time+"ns" - println("time spent typechecking: "+show(typerTime)) - println("time spent in implicits: "+show(implicitTime)) - println(" successful in scope: "+show(inscopeSucceed)) - println(" failed in scope: "+show(inscopeFail)) - println(" successful of type: "+show(oftypeSucceed)) - println(" failed of type: "+show(oftypeFail)) - println(" successful manifest: "+show(manifSucceed)) - println(" failed manifest: "+show(manifFail)) - println("implicit cache hitratio: "+"%2.1f".format(hits.toDouble / (hits + misses) * 100)) - println("time spent in failed : "+show(failedSilent)) - println(" failed op= : "+show(failedOpEqs)) - println(" failed applu : "+show(failedApplies)) - */ - typerTime = 0L - implicitTime = 0L - inscopeSucceed = 0L - inscopeFail = 0L - oftypeSucceed = 0L - oftypeFail = 0L - manifSucceed = 0L - manifFail = 0L - hits = 0 - misses = 0 + if (util.Statistics.enabled) + typerTime += System.nanoTime() - start } def apply(unit: CompilationUnit) { try { |