On Fri Dec 05 2014 at 10:46:54 PM sebb <[email protected]> wrote:

>
> There are ways round this:
> - provide a way to select Object storage for all variables. However
> this would be a nuisance if the variable is not a RefCursor
> - provide a way to select Object storage specific variable names
> - provide a way to select Object storage for specific variable types
> (e.g. all RefCursor types)
>
> It's vital that any such change is optional, and does not change the
> existing behaviour.
>
>  Hi
Thank you for a fast response, I understand your concerns.
I would like to propose the fourth solution:
Instead of messing with the variable stored in jmvars we could in the
output part, check if a variable is a ResultSet and if it is we loop
through it and output the count of records.

I believe that this would benefit everyone because it would actually
generate the full load of the request, now it is only generating load for
the first rows. And the user (me :)) does not have to do any additional
scripting beyond calling the stored procedure to loop through the cursor.

In my experience with optimizing Oracle performance there can be a
significant difference between starting a query and  actually finish
reading through it. This is often overlooked when timing and tracing stored
procedure calls that return refcursors.

Something like this works for me (providing gmail does not mess it up) :
Index:
src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/AbstractJDBCTestElement.java
===================================================================
---
src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/AbstractJDBCTestElement.java
(revision
1643442)
+++
src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/AbstractJDBCTestElement.java
(working
copy)
@@ -242,6 +242,12 @@
                     sb.append(i+1);
                     sb.append("] ");
                     sb.append(o);
+                    if( o instanceof java.sql.ResultSet ) {
+                        int j=0;
+                        while(((java.sql.ResultSet)o).next())
+                            j++;
+                        sb.append(" "+j+" rows");
+                    }
                     sb.append("\n");
                 }
             }

Regards
Yngvi

Reply via email to