profiler refactor to print every period if new data has arrived