Custom events

Code profiling for .NET developers.

Moderators: AndrewH, melvyn.harbour, james.billings, Laura Morley, dene.boulton

Custom events

Postby baruchl » Fri Jul 27, 2012 12:34 am

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?)

thanks,
Busi
baruchl
 
Posts: 2
Joined: Sun Nov 20, 2005 8:36 am

Postby jessica.ramos » Fri Jul 27, 2012 10: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";
RedGate.Profiler.UserEvents.ProfilerEvent.SignalEvent("button");
}
Jessica Ramos
Technical Support
Red Gate Software Ltd.
jessica.ramos
 
Posts: 235
Joined: Mon Apr 23, 2012 1:13 pm

Postby baruchl » Fri Jul 27, 2012 11: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.

Thanks!
Busi
baruchl
 
Posts: 2
Joined: Sun Nov 20, 2005 8:36 am


Return to ANTS Performance Profiler 7

Who is online

Users browsing this forum: No registered users and 0 guests