Added performance measuring.