add performance measuring inside controller