Monitoring performance

Is there a way to monitor the performance of a flash video frame by frame?
I have a game that I am making and am trying to find out what is causing it to lag sometimes. A performance monitor would help big time.