I think this is potentially trivial to do in JMeter.  I'm thinking I
could make a timer that delayed until a particular time is reached. 
That would let you attach this timer to any particular sample, and all
threads would be delayed until the user-entered time is reached.

However, with the Thread Group, I feel like we have discovered that
absolute times are not the most useful thing to use in JMeter.  Relative
times seem better - ie a delay that delays until a certain amount of
time has passed since the test started.  

Of course, I would do both options in this timer.  Really would be very
simple.  Do you think that would meet your needs?

-Mike

On Thu, 2005-02-24 at 03:56, Leo Leo wrote:
> Hello!
> 
> I am using JMeter now for a few days now, and I have to say: great software,
> I like it very much! Thank you for your work.
> 
> I have the task to "synchronise" the different threads of a thread group.
> The aim is, that after several steps in our web application (login procedure
> etc.) all threads execute the same HTTPS-request nearly at the same time (in
> between 1 to 2 seconds). 
> 
> To be more specific: Let's say I have 3 users in parallel and all start
> their work at 08:00:00. The first user finishes its work at 08:02:05, the
> second at 08:03:45 and the third at 08:04:15. How can I achieve the goal, so
> that all users (HTTP-sessions have to be kept) set a HTTP-request at
> 08:05:00 ?
> 
> Since I could not find any suitable JMeter component, I thought about
> different approaches.
> 
> 1. Approach:
> ============
> First I tried to set the synchronized time (in the example above 08:05:00)
> with predefiend variables ('s_' stands f�r 'synchronized')
> s_year = 2005
> s_month = 2
> s_day = 23
> s_hour = 8
> s_minute = 5
> s_second = 0
> 
> 
> In addition with a WHILE-Controller and a Delay-Timer (100 ms) as a child of
> this WHILE-Controller, a JavaSript-Function should return true, if the
> actual time:
> ${__javaScript(if (new Date().getTime() > Date.UTC(${s_year}, ... ,
> $(s_second)) return true,)}
> 
> Well the problem is, that new Date().getTime() works perfectly, but
> Date.UTC(...) doesnt. It is not executed, whatever I try: (even new
> Date().UTC(...)
> 
> 
> 2. Approach:
> ============
> 
> I tried to use the BSF-Sampler in order to have more scripting capabilities.
> But I have no idea how to use it, since the documentation of the BSF is not
> really "user friendly". I am no Java-programmer. I have the
> bsf.jar file and the jpython.jar file (since I'd like to use Python, but it
> could be JavaScript too..)
> 
> The thing I'd like to know is, how can I get the BSF to run? Where do I have
> to put the jars (bsf.jar, jython.jar), what entries do I have to put in the
> BSF-Sampler what else do i have to do in order to execute the following
> (testing) python scrtipt.
> 
> # --- python start ---
> 
> # import the module time
> import time
> # delay execution for 10 secondes
> time.sleep(10)
> 
> # --- python script end ---
> 
> I would paste this testing peace of code in the "Script to run" - Box 
> and set the "Scripting language:" to "jython".
> 
> I'd prefer the 2nd approach over the first, in order to have the
> jython-capabilities...
> 
> 3. Approach:
> ============
> Do you know any other possibilities to synchronize threads?
> 
> Thank you very much, 
> Leo
-- 
Michael Stover <[EMAIL PROTECTED]>
Apache Software Foundation


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to