You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by "BAZLEY, Sebastian" <Se...@london.sema.slb.com> on 2003/12/01 13:11:16 UTC

Proxy changes

If you can get it to work, it would be good.
 
But it might be an idea to make Listener notification switchable.
We're intending to use a pre-defined standard recording script, and would
like to be able add listeners to it without necessarily having them invoked
during proxy recording.

[The idea is that JMeter is started with a default script, the test is
recorded, and saved as a new script. Saves a bit of effort, especially as
one can edit the JMX file to add the proxy controller.]

==

I'm also intending to add Simple Controllers (SC) to contain each set of
samples, as an option.
This will require a change to ProxyControl so that the Controllers are added
as the next child of the original target, and the samples are added as
children of the SC. I think this can be done by just changing the target to
the last SC, having previously stored the original target elsewhere, so that
the next SC can be added OK.

At the moment, the Proxy class only accepts one request per browser
connection; it always closes the connection when it has been processed. I'd
like to change that to re-use the connection (having regard to the
connection: close headers). I'm hoping that this will give another way of
detecting when a page has been fully loaded.

S.
-----Original Message-----
From: Jordi Salvat i Alabart [mailto:jsalvata@atg.com]
Sent: 30 November 2003 23:29
To: JMeter Developers List
Subject: Re: cvs commit:
jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/proxy
Proxy.java ProxyControl.java


Hi.

I've just noticed that this change can become problematic -- due to the 
need to notify listeners of test start/stop events to get them do their 
job properly. I will change it now -- or remove it if I can't get where 
I want to.

Sorry for the little mess.
-- 
Salut,

Jordi.

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


Re: Proxy changes

Posted by Jordi Salvat i Alabart <js...@atg.com>.
It's working now. What I've done is to transform the proxy into a 
container and have it notify listeners within it. Because those 
listeners are outside of the test plan, they should never receive actual 
test start/stop events, so we should be safe.

A side advantage is that we can now have the proxy store its results 
within itself, which should be more intuitive. The Recording Controller 
looked like a good idea at a certain point, but it's not practical -- we 
created it to make it easy for the user to specify where he wanted his 
results stored, but it turned out that, as soon as you have multiple 
recording controllers, you're back to the same problem we had before. 
I'd like to deprecate that component (not remove it because that would 
break loading of old test plans, but possibly remove it from the menus). 
Saving into the proxy itself should be a reasonable default.

En/na BAZLEY, Sebastian ha escrit:
> If you can get it to work, it would be good.
>  
> But it might be an idea to make Listener notification switchable.

Hmmm... you'd just need to press Ctrl-E to get rid of whatever we've 
placed there...

> We're intending to use a pre-defined standard recording script, and would
> like to be able add listeners to it without necessarily having them invoked
> during proxy recording.
>
> [The idea is that JMeter is started with a default script, the test is
> recorded, and saved as a new script. Saves a bit of effort, especially as
> one can edit the JMX file to add the proxy controller.]

I think I get the idea. What you mean is that we would need two separate 
places: one to store the recorded test to, another for the listeners.

An idea:

* As we start JMeter, instead of getting everything blank, we get a 
Workflow with an HTTP Proxy and a controller named sthg like "Recorded 
Samples". The proxy's target points to it by default. Ideally, the proxy 
and this container should be deletable, but not moveable to the test plan.

* We use the Proxy container to store proxy configuration stuff:
   - Listeners for the proxy-triggered events (start/stop test & sample 
events for the time being.
   - HTTP Defaults
   - ...
   We may even provide some default ones initially (at least a listener).

Makes sense? Does it fit your ideas? How does it sound?

> ==
> 
> I'm also intending to add Simple Controllers (SC) to contain each set of
> samples, as an option.

Absolutely. I was thinking about doing this today if I could find the 
time... should not be that difficult. The proxy would have these options 
for timed-based grouping:
a- Don't do time-based grouping.
b- Use separators between groups.
c- Store each group in a separate container.
d- Record first request in each group only.

> This will require a change to ProxyControl so that the Controllers are added
> as the next child of the original target, and the samples are added as
> children of the SC. I think this can be done by just changing the target to
> the last SC, having previously stored the original target elsewhere, so that
> the next SC can be added OK.

Or just, if you're processing a second sampler and you're in option c, 
scan the containers in the target each time and store the sampler in the 
last one.

> At the moment, the Proxy class only accepts one request per browser
> connection; it always closes the connection when it has been processed. I'd
> like to change that to re-use the connection (having regard to the
> connection: close headers). I'm hoping that this will give another way of
> detecting when a page has been fully loaded.

I don't think so. Browsers don't necessarily do all requests for a page 
over a single connection. They may open up to 4-5 connections to 
download images concurrently (this is from the times of the 1st 
Netscapes -- that was the feature that made them defeat Mosaic).

> S.
> -----Original Message-----
> From: Jordi Salvat i Alabart [mailto:jsalvata@atg.com]
> Sent: 30 November 2003 23:29
> To: JMeter Developers List
> Subject: Re: cvs commit:
> jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/proxy
> Proxy.java ProxyControl.java
> 
> 
> Hi.
> 
> I've just noticed that this change can become problematic -- due to the 
> need to notify listeners of test start/stop events to get them do their 
> job properly. I will change it now -- or remove it if I can't get where 
> I want to.
> 
> Sorry for the little mess.


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