Another Question About Profiling Times
Brian Donahue
Posts: 6,590 Bronze 1
Hi Bill,
Sorry about the delay in answering you. Rather than try to figure out
how this application behaves, I'll tell you what ANTS Profiler does. It
notes the time that the application went into the function in the Interop
assembly, then it notes the time that the Interop function returned. If this
means that if the thread returns as soon as it is launched, which is what
I'd assume because it's running asynchronously, then you probably won't know
how long the thread spent running.
I hope this is a satisfactory explanation for you. If I can do anything
else, please let me know.
Regards,
Brian Doanhue
Red Gate Technical Support
"Bill S" <bebop_lives@yahoo.com> wrote in message
news:fUQWOdJgEHA.1696@server53...
> I have another question.
>
> We are trying to monitor a some communications to an external device.
> Basically, we want to know how much time is being dedicated to
> communications so that we can know if it is worth optimizing them.
>
> Communications take place thru a unmanaged C DLL that communicates to a
> proprietary API within a 2nd DLL. We interact with the first DLL thru
> Interop. To make life a little more complicated, these communications
take
> place on a background thread.
>
> My question is this:
>
> If my elapsed time is 3.4 seconds, and ANTS reports 2.2 seconds as the
total
> time for our main method, what should we assume about the missing 1.2
> seconds?
> If I call thru to the 2nd DLL from the interop assembly, should I see the
> duration of time spent in the 2nd DLL added to my call time for the
interop
> assembly?
> Or is it not accounted for, and can I only assume: ElapsedTime -
> MainMethod call time = CommunicationTime?
>
> I hope this is clear.
>
> Thanks,
>
> Bill
>
>
Sorry about the delay in answering you. Rather than try to figure out
how this application behaves, I'll tell you what ANTS Profiler does. It
notes the time that the application went into the function in the Interop
assembly, then it notes the time that the Interop function returned. If this
means that if the thread returns as soon as it is launched, which is what
I'd assume because it's running asynchronously, then you probably won't know
how long the thread spent running.
I hope this is a satisfactory explanation for you. If I can do anything
else, please let me know.
Regards,
Brian Doanhue
Red Gate Technical Support
"Bill S" <bebop_lives@yahoo.com> wrote in message
news:fUQWOdJgEHA.1696@server53...
> I have another question.
>
> We are trying to monitor a some communications to an external device.
> Basically, we want to know how much time is being dedicated to
> communications so that we can know if it is worth optimizing them.
>
> Communications take place thru a unmanaged C DLL that communicates to a
> proprietary API within a 2nd DLL. We interact with the first DLL thru
> Interop. To make life a little more complicated, these communications
take
> place on a background thread.
>
> My question is this:
>
> If my elapsed time is 3.4 seconds, and ANTS reports 2.2 seconds as the
total
> time for our main method, what should we assume about the missing 1.2
> seconds?
> If I call thru to the 2nd DLL from the interop assembly, should I see the
> duration of time spent in the 2nd DLL added to my call time for the
interop
> assembly?
> Or is it not accounted for, and can I only assume: ElapsedTime -
> MainMethod call time = CommunicationTime?
>
> I hope this is clear.
>
> Thanks,
>
> Bill
>
>
Comments
ANTS Profiler 2.5 now records the total time spent in a COM interop method correctly.