← Back to team overview

launchpad-dev team mailing list archive

Re: Get the query generated by Storm

 

On Thu, Mar 3, 2011 at 3:54 PM, Gary Poster <gary.poster@xxxxxxxxxxxxx> wrote:
> Robert or someone: hi.  Could you provide some hints or answers to the following?
>
> 1) Let's say you want to see what SQL is being generated by Storm in a test.  Is there a better way to do it other than debugger breaks into Storm guts?

You can use any of StormStatementRecorder, LP_DEBUG_SQL=1,
LP_DEBUG_SQL_EXTRA=1, QueryCollector. In extremis you can also turn on
statement logging in postgresql.

> 2) Let's sat you want to see what SQL is being generated by Storm in a POST on launchpad.dev.  ++oops++ only seemed to record my GETs for some reason (I'm looking in /var/tmp/lperr/).  ++profile++show didn't help because I was redirected immediately after the POST, as we often do.  Is there a better way to do it other than debugger breaks into Storm guts or other similar hacks?

++profile++log might help. I think we have room to add more oomp to
the ++oops++ and ++profile++ decorators here.

HTH,
-Rob



References