Programatically see the query that was just executed?

44 views
Skip to first unread message

Justin A

unread,
Sep 25, 2014, 9:53:55 PM9/25/14
to rav...@googlegroups.com
Is there a way to programatically see the query that was just executed?

When i'm working against the Raven.Server.exe on my localhost, I can see this ...


df Which is really really helpful!!!!!

but i'm in a unit test (read: against an embedded doc store) and i'm .. well .. playing around/experiementing .

 So.. is there a magical way? I'm scared that the answer will be: *There is no way when using an Embedded Doc Store* :/

(btw: i tried looking into a RavenQueryStatistics but I couldn't see any properties in there)


-J-

Oren Eini (Ayende Rahien)

unread,
Sep 26, 2014, 3:52:21 AM9/26/14
to ravendb
Hi,
That is possible, you need to use the builtin profiler.

store.InitializeProfiling(); 

id = ((DocumentSession)session).DatabaseCommands.ProfilingInformation.Id;

var profilingInformation = store.GetProfilingInformationFor(id);



Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Justin A

unread,
Sep 29, 2014, 2:17:14 AM9/29/14
to rav...@googlegroups.com
oh wow! secret info :)

ok .. lets see .... /me has a go ...

nope :(


Both sync and async returns null :(

wouldn't have anything to do with how i'm casting the DocumentStore?



Oren Eini (Ayende Rahien)

unread,
Sep 29, 2014, 5:30:22 AM9/29/14
to ravendb
You are using embedded mode? 
If this in 2.5, that wouldn't be profiled.
In 3.0, it would be.

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


Justin A

unread,
Sep 29, 2014, 10:55:37 PM9/29/14
to rav...@googlegroups.com
rgr :) i'll wait for 3.+
Reply all
Reply to author
Forward
0 new messages