[Profiler] Fix gc test by checking for at least one gc event between …