Profiling DB calls using IL Rewriting Profiler

Jan 6, 2015 at 11:31 AM
Edited Jan 6, 2015 at 11:34 AM

I am in developing a .Net profiler by following IL rewriting techinique.. And i am able to get the call stacks , the details about the requests and the function calls.

Now i am in need for profiling the DB related calls and to log the DB queries and their execution time.

Is that really possible with IL rewriting ?? IF so can i please get any clues on how to obtain that..?

I am trying to get the arguments from DB related function like set_ConnectionString(string) by getting it's IL code. But i dont know how to get the string parameter from it.. First of all i am not sure whether this way is rite.. Can any one help me on this,..??