You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Edgar Poce <ed...@gmail.com> on 2005/07/01 14:20:39 UTC

measuring performance of commons chain commands

Hi

 I'd like to measure the performance of my commons chain commands. I
think I could wrap each Command in a JavaSamplerClient implementation,
but I plan to have lots of them and i'd like to use a more generic
approach. I'm thinking of writing a new protocol for commons chain,
but I'm not sure whether it's the right way to go. Could anyone point
me in the right direction?

thanks in advance
edgar

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: measuring performance of commons chain commands

Posted by sebb <se...@gmail.com>.
On 7/6/05, Edgar Poce <ed...@gmail.com> wrote:
> Hi seth
> 
> On 7/6/05, Seth Ladd <se...@ehawaii.gov> wrote:
> > Edgar Poce wrote:
> > > Hi
> > >
> > >  I'd like to measure the performance of my commons chain commands. I
> > > think I could wrap each Command in a JavaSamplerClient implementation,
> > > but I plan to have lots of them and i'd like to use a more generic
> > > approach. I'm thinking of writing a new protocol for commons chain,
> > > but I'm not sure whether it's the right way to go. Could anyone point
> > > me in the right direction?
> >
> > I recommend using the beanshell environment.  It makes it very easy to
> > test Java code, without having to implement a JavaSamplerClient.
> 
> thank you  for your comment. I don't like the idea of using the
> beanshell environment because it's too jmeter specific. I don't see

Not so - see below.

> any benefit over the commons chain approach, most probably because my
> ignorance on stress testig matters :(. If you do please let me know
> the reasons, I'd really appreciate it.
>
> I already made a ChainSampler[1] which runs Commons chain commands.
> It's quite straight forward, I put the jar with my commands and that's
> it. I think this It's a good approach because I can reuse the code for
> other purposes than performance testing. Please let me know whether
> this appreciation is wrong.

Seems to me that the ChainSampler is at least as JMeter-specific as
the BeanShell Sampler.

The intention of the BeanShell Sampler was to provide a simple way to
create samplers - all that needs to be done is to perform the sample,
with the rest of the details being taken care of (e.g. calculating
times).

The BSH script can be developed standalone if required, and then
plugged into the sampler with almost no more code (just set the status
and return the data). The disadvantage is that BSH may be a bit slower
than compiled Java code.

Howver, now that the ChainSampler has been written, it probably makes
sense to stick with that.

> thanks again,
> edgar
> 
> [1] http://svn.apache.org/viewcvs.cgi/incubator/jackrabbit/trunk/contrib/jcr-commands/jmeter-chain/src/java/org/apache/jmeter/protocol/java/
> 
> >
> > Seth
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: measuring performance of commons chain commands

Posted by Edgar Poce <ed...@gmail.com>.
Hi seth
 
On 7/6/05, Seth Ladd <se...@ehawaii.gov> wrote:
> Edgar Poce wrote:
> > Hi
> >
> >  I'd like to measure the performance of my commons chain commands. I
> > think I could wrap each Command in a JavaSamplerClient implementation,
> > but I plan to have lots of them and i'd like to use a more generic
> > approach. I'm thinking of writing a new protocol for commons chain,
> > but I'm not sure whether it's the right way to go. Could anyone point
> > me in the right direction?
> 
> I recommend using the beanshell environment.  It makes it very easy to
> test Java code, without having to implement a JavaSamplerClient.

thank you  for your comment. I don't like the idea of using the
beanshell environment because it's too jmeter specific. I don't see
any benefit over the commons chain approach, most probably because my
ignorance on stress testig matters :(. If you do please let me know
the reasons, I'd really appreciate it.

I already made a ChainSampler[1] which runs Commons chain commands.
It's quite straight forward, I put the jar with my commands and that's
it. I think this It's a good approach because I can reuse the code for
other purposes than performance testing. Please let me know whether
this appreciation is wrong.

thanks again,
edgar

[1] http://svn.apache.org/viewcvs.cgi/incubator/jackrabbit/trunk/contrib/jcr-commands/jmeter-chain/src/java/org/apache/jmeter/protocol/java/

> 
> Seth
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: measuring performance of commons chain commands

Posted by Seth Ladd <se...@ehawaii.gov>.
Edgar Poce wrote:
> Hi
> 
>  I'd like to measure the performance of my commons chain commands. I
> think I could wrap each Command in a JavaSamplerClient implementation,
> but I plan to have lots of them and i'd like to use a more generic
> approach. I'm thinking of writing a new protocol for commons chain,
> but I'm not sure whether it's the right way to go. Could anyone point
> me in the right direction?

I recommend using the beanshell environment.  It makes it very easy to 
test Java code, without having to implement a JavaSamplerClient.

Seth

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: measuring performance of commons chain commands

Posted by Edgar Poce <ed...@gmail.com>.
Hi devs,

Sorry for answering my own mail. I already solved my problem using the
singleton pattern.

I think this extension might be useful for other users too, so I
uploaded the sources to bugzilla just in case you feel it's worth to add it.

Feedback is highly apreciated, I'll commit it as a proof of concept to
apache jackrabbit sandbox today with a few jcr commands.

You've done a great job!
edgar

Edgar Poce wrote:
> Hi
> 
> Peter Lin wrote:
> 
>> there's a developer doc that mike and I wrote.
> 
> thanks, it's really useful!. I was able to run commons chain commands :).
> 
> Now I'd like to use jmeter to test performance of apache jackrabbit. I 
> already made some commands that perform actions on an already 
> initialized server but I'm stuck trying to find out how to initialize 
> the server only once and make it accesible to every ThreadGroup.
> 
> I'd like to do something like.
> 
>  -> start jackrabbit. Run only once, preferably on jmeter startup.
> 
> ThreadGroup
>  -> do something (needs a jackrabbit instance in the ThreadContext)
> 
>  -> stopjackrabbit. Run only once, preferably on jmeter shutdown.
> 
> thanks again,
> edgar
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org


Re: measuring performance of commons chain commands

Posted by Edgar Poce <ed...@gmail.com>.
Hi

Peter Lin wrote:
> there's a developer doc that mike and I wrote.
thanks, it's really useful!. I was able to run commons chain commands :).

Now I'd like to use jmeter to test performance of apache jackrabbit. I 
already made some commands that perform actions on an already 
initialized server but I'm stuck trying to find out how to initialize 
the server only once and make it accesible to every ThreadGroup.

I'd like to do something like.

  -> start jackrabbit. Run only once, preferably on jmeter startup.

ThreadGroup
  -> do something (needs a jackrabbit instance in the ThreadContext)

  -> stopjackrabbit. Run only once, preferably on jmeter shutdown.

thanks again,
edgar


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: measuring performance of commons chain commands

Posted by Peter Lin <wo...@gmail.com>.
there's a developer doc that mike and I wrote.

http://cvs.apache.org/viewcvs.cgi/*checkout*/jakarta-jmeter/xdocs/extending/jmeter_tutorial.pdf?rev=1.5

peter lin


On 7/1/05, Edgar Poce <ed...@gmail.com> wrote:
> Hi
> 
>  I'd like to measure the performance of my commons chain commands. I
> think I could wrap each Command in a JavaSamplerClient implementation,
> but I plan to have lots of them and i'd like to use a more generic
> approach. I'm thinking of writing a new protocol for commons chain,
> but I'm not sure whether it's the right way to go. Could anyone point
> me in the right direction?
> 
> thanks in advance
> edgar
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org