jonwagner / EventSourceProxy

EventSourceProxy (ESP) is the easiest way to add scalable Event Tracing for Windows (ETW) logging to your .NET program
Other
97 stars 20 forks source link

Use Start & Stop EventOpCodes instead of <Method> & <Method>_Complete #5

Closed ibebbs closed 10 years ago

ibebbs commented 10 years ago

Hi Jon,

I was wondering why you chose to use & _Complete events rather than using the Start & Stop EventOpCode values to signify commencement and completion of a method. Used in conjunction with a EventTask (perhaps named after the method) this approach provides enhanced tracing in the standard tooling (i.e. PerfView - which can then provide Duration Milliseconds of the operation).

Cheers, Ian

jonwagner commented 10 years ago

If I recall properly (and I may not), when ESP implements a proxy, it implements two methods. Foo(input parameters) and Foo_Completed(output parameters). They are separate methods because you probably don't want to re-log the input parameters.

Even though they are separate methods, it should be using the same event code and using Start/Stop opcodes so you can do timing.

If you are seeing something else, please post some repro code and I can take a look.

ibebbs commented 10 years ago

Gotcha.

Apologies, I must have missed this in the (shamefully small) testing I've done so far.

jonwagner commented 10 years ago

No problem. Let me know if you have any issues.