Custom events

Code profiling for .NET Developers

Custom events

Postby baruchl » Thu Jul 26, 2012 11:34 pm

Hello, I followed your directions to add custom events in my code, however, when profiling the code, only some of the indicators are presented.

what is the reason for that? is it because of sampling of the data?
is there anyway to cause the indicators to appear no matter what? (just like exceptions?)

Posts: 2
Joined: Sun Nov 20, 2005 7:36 am

Postby jessica.ramos » Fri Jul 27, 2012 9:53 pm

Hi Busi,

Thank you for your post! Can I ask--are you placing custom event markers within your events? If so, the custom events might happen so soon after the actual events that only the actual events' markers appear in the timeline (though both markers might still show for the first occurrence). The profiler removes events that are too close together in order to avoid ending up with huge results files.

Shorter methods like this might cause this:

private void button1_Click(object sender, EventArgs e)
button1.Text = "Clicked";
Jessica Ramos
Technical Support
Red Gate Software Ltd.
Posts: 369
Joined: Mon Apr 23, 2012 12:13 pm

Postby baruchl » Fri Jul 27, 2012 10:25 pm

Hi Jessica,
thanks for the fast reply.

I find this behavior very strange.
For me, a "custom event marker" doesn't really represent a real event, but just a marker I want to add to facilitate the profiling. For example before and after a function call.

This is very helpful when you try to define the interesting time range to profile. So, if I put an event marker before and after a method call, if the method duration may vary, sometimes I will see the marker and sometimes I will not. This is non-deterministic and may lead to frustration.

I love the way the exceptions are being logged and presented even if they are very close to each other (stack). I would love to see those custom event markers behaving just like the exceptions.

Posts: 2
Joined: Sun Nov 20, 2005 7:36 am

Return to ANTS Performance Profiler Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests