Executed event

Developer
Sep 22, 2011 at 6:22 PM

While I was tuning an Entity Framework project, CommandExecuted event in Tracing and Caching for Entity Framework was quite useful to narrow down performance issues.

http://blogs.msdn.com/b/jkowalski/archive/2009/06/11/tracing-and-caching-in-entity-framework-available-on-msdn-code-gallery.aspx

and now that I have Cassandra performance issues in my project that I need to investigate further.

I have added tracing capability before, but Executed events gave me more flexibility in EF, and I guess it is sometimes also helpful for Cassandraemon.

Thoughts?

Coordinator
Sep 22, 2011 at 9:00 PM

Good idea! I think it is useful.

And I want other events.

example

  • Connected Event
  • Disposed Event
  • ConnectionFail Event

What do you think?

Developer
Sep 24, 2011 at 6:41 PM

Those sound good as well.

Do you think these events should be global (i.e., public static event ...) or per-CassandraContext?

Disposed is probably per-context, but for tracing purposes, static events are good enough and uses less memory.

But I also wonder there may be other use of events if we implement it as per-context. Is per-context events good, or overkill?

Coordinator
Sep 25, 2011 at 12:06 AM

SqlConnection class have per-context events. Following this example may be good. How do you feel?

http://msdn.microsoft.com/ja-jp/library/system.data.sqlclient.sqlconnection.aspx

Developer
Sep 25, 2011 at 2:08 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.