Add profiling to mark-as-completed operation