diff options
-rw-r--r-- | sources/scala/tools/nsc/util/Statistics.scala | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/sources/scala/tools/nsc/util/Statistics.scala b/sources/scala/tools/nsc/util/Statistics.scala new file mode 100644 index 0000000000..940664b41d --- /dev/null +++ b/sources/scala/tools/nsc/util/Statistics.scala @@ -0,0 +1,37 @@ +/* NSC -- new scala compiler + * Copyright 2005 LAMP/EPFL + * @author Martin Odersky + */ + +// $Id$ + +package scala.tools.nsc.util; + +//import java.io._; +//import symtab.Flags._; + +abstract class Statistics { + + val global: Global; + import global._; + + def print(phase: Phase) = { + inform("*** Cumulative statistics at phase " + phase); + inform("#tree nodes : " + nodeCount); + inform("#identifiers : " + analyzer.idcnt); + inform("#selections : " + analyzer.selcnt); + inform("#applications: " + analyzer.appcnt); + inform("#implicits : " + analyzer.implcnt); + inform("#typecreates : " + accesses); + inform("#uniquetypes : " + uniques); + inform("#collisions : " + collisions); + inform("#symbols : " + symbolCount); + inform("#type symbols: " + typeSymbolCount); + inform("#class symbols: " + classSymbolCount); + inform("#singleton closures: " + singletonClosureCount); + inform("#compound closures : " + compoundClosureCount); + inform("#typeref closures : " + typerefClosureCount); + } + +} + |