jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "frank sander" <>
Subject How to write a date controller for jmeter 1.9.1 ?
Date Fri, 14 Nov 2003 16:16:07 GMT
Hello friends,

I'm new in JMeter and struggle with some problems. I want to write a 
controller which executes Samples only at service times (e.g. 7 am to 7 pm). 
I want to have a continous test, so there will be no termination of the test 
at all.

I did following:
I wrote a JMeterTimeController class inherited from GenericController and a 
JMeterTimeControllerGui inherited from AbstractControllerGui.

My understanding is, that the Sample, I want to test, is nested inside this 
I implemented the "public Sample next()" method, which returns the Sample at 
service time and returns null, if not (e.g. at 12 am).

Code is following:
    public Sampler next() {
		Date date = new Date(System.currentTimeMillis());
		Sampler currentElement =;
		if (date.getHours()>6 || date.getHours()<20 ) {
			return currentElement;
		} else {
			return null;

setDone(true) isn't called, because I don't want the Test stopped.
I saw similar code in and I wonder, why I get allways a 
"StackOverflow" Exception.

The tree in the Gui is following:

   +-Time Controller (the one I wrote)
      +-Constant Throughput Timer

What did I miss ?

Thank you for your help and suggestions,



The new MSN 8: advanced junk mail protection and 2 months FREE*

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message