Index: src/SymTab/Indexer.cc
===================================================================
--- src/SymTab/Indexer.cc	(revision 7abee383f06a7fe5690784e7676edcdf68ff7660)
+++ src/SymTab/Indexer.cc	(revision 34737de740e2e26a5572e02ff18b44f650d8cae8)
@@ -26,4 +26,5 @@
 #include "Common/SemanticError.h"  // for SemanticError
 #include "Common/utility.h"        // for cloneAll
+#include "Common/Stats/Counter.h" // for counters
 #include "GenPoly/GenPoly.h"
 #include "InitTweak/InitTweak.h"   // for isConstructor, isCopyFunction, isC...
@@ -41,4 +42,19 @@
 
 namespace SymTab {
+
+	// Statistics block
+	namespace {
+		auto idtable_group = new Stats::Counters::CounterGroup("IdTable");
+		auto idtable_find  = new Stats::Counters::SimpleCounter("Find calls", idtable_group);
+		auto idtable_size  = new Stats::Counters::AverageCounter<double>("Average Size", idtable_group);
+		auto idtable_key   = new Stats::Counters::AverageCounter<double>("Average Key Size", idtable_group);
+
+		auto indexers_group = new Stats::Counters::CounterGroup("Indexers");
+		auto indexers_count = new Stats::Counters::SimpleCounter("Count", indexers_group);
+		auto indexers_size  = new Stats::Counters::AverageCounter<double>("Average Size", indexers_group);
+		auto indexers_depth_a  = new Stats::Counters::AverageCounter<double>("Average Depth", indexers_group);
+		auto indexers_depth_m  = new Stats::Counters::MaxCounter<size_t>("Max Depth", indexers_group);
+	}
+
 	std::ostream & operator<<( std::ostream & out, const Indexer::IdData & data ) {
 		return out << "(" << data.id << "," << data.baseExpr << ")";
@@ -197,7 +213,11 @@
 	}
 
-	Indexer::Indexer() : tables( 0 ), scope( 0 ) {}
-
-	Indexer::Indexer( const Indexer &that ) : doDebug( that.doDebug ), tables( newRef( that.tables ) ), scope( that.scope ) {}
+	Indexer::Indexer() : tables( 0 ), scope( 0 ) {
+		(*indexers_count)++;
+	}
+
+	Indexer::Indexer( const Indexer &that ) : doDebug( that.doDebug ), tables( newRef( that.tables ) ), scope( that.scope ) {
+		(*indexers_count)++;
+	}
 
 	Indexer::Indexer( Indexer &&that ) : doDebug( that.doDebug ), tables( that.tables ), scope( that.scope ) {
@@ -206,4 +226,13 @@
 
 	Indexer::~Indexer() {
+		if(tables) {
+			indexers_size->push( tables->idTable.size() );
+			size_t depth = 1;
+			for( auto crnt = tables->base.tables; crnt; crnt = crnt->base.tables ) {
+				++depth;
+			}
+			indexers_depth_a->push( depth );
+			indexers_depth_m->push( depth );
+		}
 		deleteRef( tables );
 	}
@@ -237,4 +266,7 @@
 		while ( searchTables ) {
 
+			(*idtable_find)++;
+			idtable_key->push( id.size() );
+			idtable_size->push( searchTables->idTable.size() );
 			IdTable::const_iterator decls = searchTables->idTable.find( id );
 			if ( decls != searchTables->idTable.end() ) {
@@ -313,4 +345,7 @@
 		if ( tables->scope < scope ) return nullptr;
 
+		(*idtable_find)++;
+		idtable_key->push( id.size() );
+		idtable_size->push( tables->idTable.size() );
 		IdTable::const_iterator decls = tables->idTable.find( id );
 		if ( decls != tables->idTable.end() ) {
@@ -331,4 +366,7 @@
 		if ( tables->scope < scope ) return false;
 
+		(*idtable_find)++;
+		idtable_key->push( id.size() );
+		idtable_size->push( tables->idTable.size() );
 		IdTable::const_iterator decls = tables->idTable.find( id );
 		if ( decls != tables->idTable.end() ) {
@@ -347,4 +385,7 @@
 		if ( tables->scope < scope ) return false;
 
+		(*idtable_find)++;
+		idtable_key->push( id.size() );
+		idtable_size->push( tables->idTable.size() );
 		IdTable::const_iterator decls = tables->idTable.find( id );
 		if ( decls != tables->idTable.end() ) {
