Profiling Windows Forms async event handlers

mhiltunenmhiltunen Posts: 2
edited December 2, 2014 6:42AM in ANTS Performance Profiler 9
Is there a way to profile async event handlers. For example if I have a code like this:
    Private Async Sub ChildForm_Load(sender As Object, e As EventArgs) Handles Me.Load

        Await Task.Run(Sub()
                       End Sub)

    End Sub

    Public Sub WaitThreeSeconds()
    End Sub

    Public Sub WaitTwoSeconds()
    End Sub

If I profile the app using Line-level & method-level timings this is what I get:


Inside ChildForm_Load all I can see is .NET StateMachine's MoveNext-method, but I can't see anything from the actual form load. Am I doing something wrong here or is there a way to see the actual performance inside async event handlers?
Sign In or Register to comment.