What are the challenges you face when working across database platforms? Take the survey

Custom events

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



  • Options
    Jessica RJessica R Posts: 1,319 Rose Gold 4
    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 | Product Support Engineer | Redgate Software

    Have you visited our Help Center?

  • Options
    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.

Sign In or Register to comment.