Re: Test instrumentation using a self.method

Philip Aston <[email protected]> Wed, 16 Sep 2015 18:56:43 +0100
Newsgroups gmane.comp.java.grinder.user
Message-ID <[email protected]>
On 16/09/15 14:29, Darren Ball wrote:
> Is it possible in the testrunner init to do something like:
>
> tests["abc"].record(self.abc)?
>
> Why is it that a specific java object method can not be instrumented? 
> Seem like only the whole object, meaning every call within?
>

You can't instrument a specific method by passing it to record as above
is that under the covers because Java does not provide a references to
bound methods, and so the Jython expression "self.abc" is actually a
Jython wrapper. The wrappers change with each version of Jython so we
(no longer) rely on Jython internals to figure out what exactly they
refer to.

Instead you can use an overloaded version of record that accepts a
filter that specifies just the methods you care about. See
http://grinder.sourceforge.net/g3/instrumentation.html#Selective+instrumentation


- Phil



------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140