performance_monitor: added 'measure' function; DONE