Moved performance calculator into directive