You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2012/06/14 23:13:02 UTC

[Bug 53418] New: Add an option to make the thread group only creates threads on demand

https://issues.apache.org/bugzilla/show_bug.cgi?id=53418

          Priority: P2
            Bug ID: 53418
          Assignee: issues@jmeter.apache.org
           Summary: Add an option to make the thread group only creates
                    threads on demand
          Severity: enhancement
    Classification: Unclassified
                OS: All
          Reporter: p.mouawad@ubik-ingenierie.com
          Hardware: All
            Status: NEW
           Version: 2.7
         Component: Main
           Product: JMeter

Currently JMeter starts all threads at startup and makes them pause to respect
the ramp.
This feature is interesting when you want to use short lived thread and start a
lot of them (thousands).

Taking into account Kirk Pepperdine requirement on users list:
http://mail-archives.apache.org/mod_mbox/jmeter-user/201206.mbox/%3CDB7650C0-5BA5-4C1E-A094-F8E5D35BA189%40gmail.com%3E

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 53418] New OnDemandThreadGroup that creates threads when needed instead of creating them on Test startup

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53418

--- Comment #7 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Date: Fri Jul 13 22:04:06 2012
New Revision: 1361415

URL: http://svn.apache.org/viewvc?rev=1361415&view=rev
Log:
Bug 53418 - New OnDemandThreadGroup that creates threads when needed instead of
creating them on Test startup
Fix SaveService fileVersion and version


Bugzilla Id: 53418

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/save/SaveService.java

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 53418] New OnDemandThreadGroup that creates threads when needed instead of creating them on Test startup

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53418

--- Comment #8 from Sebb <se...@apache.org> ---
Reworked the code:

URL: http://svn.apache.org/viewvc?rev=1372462&view=rev
Log:
Merge OnDemandThreadGroup into ThreadGroup
Bugzilla Id: 53418

Removed:
    jmeter/trunk/src/core/org/apache/jmeter/threads/OnDemandThreadGroup.java
   
jmeter/trunk/src/core/org/apache/jmeter/threads/gui/OnDemandThreadGroupGui.java
Modified:
    jmeter/trunk/bin/saveservice.properties
    jmeter/trunk/docs/images/screenshots/threadgroup.png
    jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties
    jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties
    jmeter/trunk/src/core/org/apache/jmeter/save/SaveService.java
    jmeter/trunk/src/core/org/apache/jmeter/threads/AbstractThreadGroup.java
    jmeter/trunk/src/core/org/apache/jmeter/threads/ThreadGroup.java
    jmeter/trunk/src/core/org/apache/jmeter/threads/gui/ThreadGroupGui.java
    jmeter/trunk/xdocs/images/screenshots/threadgroup.png
    jmeter/trunk/xdocs/usermanual/component_reference.xml


URL: http://svn.apache.org/viewvc?rev=1372467&view=rev
Log:
No longer need these

Removed:
    jmeter/trunk/docs/images/screenshots/ondemandthreadgroup.png
    jmeter/trunk/xdocs/images/screenshots/ondemandthreadgroup.png

URL: http://svn.apache.org/viewvc?rev=1372481&view=rev
Log:
Merge OnDemandThreadGroup into ThreadGroup:
Don't display delayed start for setUp/tearDown thread groups
Rename onDemand as delayed_start
Make the property optional in JMC files

Bugzilla Id: 53418

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties
    jmeter/trunk/src/core/org/apache/jmeter/threads/ThreadGroup.java
    jmeter/trunk/src/core/org/apache/jmeter/threads/gui/PostThreadGroupGui.java
   
jmeter/trunk/src/core/org/apache/jmeter/threads/gui/SetupThreadGroupGui.java
    jmeter/trunk/src/core/org/apache/jmeter/threads/gui/ThreadGroupGui.java


URL: http://svn.apache.org/viewvc?rev=1372484&view=rev
Log:
delayedStartup needs to be constant
Bugzilla Id: 53418

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/threads/ThreadGroup.java

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 53418] New OnDemandThreadGroup that creates threads when needed instead of creating them on Test startup

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53418

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |53501

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 53418] New Option "Delay thread creation until needed" that will create and start threads when needed instead of creating them on Test startup

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53418

--- Comment #11 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Bug name was:
- New OnDemandThreadGroup that creates threads when needed instead of creating
them on Test startup

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 53418] New OnDemandThreadGroup that creates threads when needed instead of creating them on Test startup

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53418

--- Comment #9 from Milamber <mi...@apache.org> ---
URL: http://svn.apache.org/viewvc?rev=1372655&view=rev
Log:
Add delayed_start French translation
Bugzilla Id: 53418

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 53418] Add an option to make the thread group only creates threads on demand

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53418

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |p.mouawad@ubik-ingenierie.c
                   |                            |om

--- Comment #1 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
I investigated this one, my draft implementation idea is the following:
- Make AbstractThreadGroup control the life of the JMeterThread threads
- So AbstractThreadGroup would have:
1) a start method that would trigger a Thread. This thread will launch
JMeterThreads and control their life.
2) A stop method to stop/interrupt them
3) isCreatingThreadsOnDemand which would return true for new behaviour

If isCreatingThreadsOnDemand returns false, StandardJMeterEngine would create
Threads as today.
If true, implementation of ThreadGroup would create threads as part of its
internal behaviour.

This way I think we don't break existing plugins that extend
AbstractThreadGroup.
But the bad point about it is that thread creation algorithm will be in Thread
Group unless we move it in AbstractThreadGroup  and call it or not, which might
be better as we need to keep control on this part to ensure right shutdown,
stop....

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 53418] New OnDemandThreadGroup that creates threads when needed instead of creating them on Test startup

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53418

--- Comment #6 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Date: Fri Jul 13 21:58:42 2012
New Revision: 1361414

URL: http://svn.apache.org/viewvc?rev=1361414&view=rev
Log:
Bug 53418 - New OnDemandThreadGroup that creates threads when needed instead of
creating them on Test startup
Fix saveservice.properties


Bugzilla Id: 53418

Modified:
    jmeter/trunk/bin/saveservice.properties

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 53418] Add an option to make the thread group only creates threads on demand

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53418

--- Comment #4 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Hello,
Feature is implemented this way:
- Moved Thread control into AbstractThreadGroup
- Default start method of AbstractThreadGroup creates threads at start of test
- New AbstractThreadGroup called OnDemandThreadGroup creates Threads when
needed
- OnDemandThreadGroupGui just changes class of ThreadGroup

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 53418] New Option "Delay thread creation until needed" that will create and start threads when needed instead of creating them on Test startup

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53418

Sebb <se...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |cflichel@novator.com

--- Comment #12 from Sebb <se...@apache.org> ---
*** Bug 47886 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 53418] New OnDemandThreadGroup that creates threads when needed instead of creating them on Test startup

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53418

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Add an option to make the   |New OnDemandThreadGroup
                   |thread group only creates   |that creates threads when
                   |threads on demand           |needed instead of creating
                   |                            |them on Test startup

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 53418] New OnDemandThreadGroup that creates threads when needed instead of creating them on Test startup

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53418

--- Comment #10 from Sebb <se...@apache.org> ---
URL: http://svn.apache.org/viewvc?rev=1373042&view=rev
Log:
StandardJMeterEngine is now responsible for starting thread groups, which in
turn are responsible for their threads.
All the thread creation and scheduling is now handled by the thread group.
This allows the JMeterThread instances to be created only when needed by the
delayed start method.
Memory should now be only limited by the number of concurrent threads.
Bugzilla Id: 53418

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/engine/StandardJMeterEngine.java
    jmeter/trunk/src/core/org/apache/jmeter/threads/AbstractThreadGroup.java
    jmeter/trunk/src/core/org/apache/jmeter/threads/ThreadGroup.java

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 53418] Add an option to make the thread group only creates threads on demand

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53418

--- Comment #2 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Created attachment 29054
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29054&action=edit
Proposed Patch

Hello,
I implemented this feature.
Hope you can have a look at it soon.

Regards
Philippe M.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 53418] New Option "Delay thread creation until needed" that will create and start threads when needed instead of creating them on Test startup

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53418

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|New OnDemandThreadGroup     |New Option "Delay thread
                   |that creates threads when   |creation until needed" that
                   |needed instead of creating  |will create and start
                   |them on Test startup        |threads when needed instead
                   |                            |of creating them on Test
                   |                            |startup

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 53418] Add an option to make the thread group only creates threads on demand

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53418

--- Comment #3 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Created attachment 29055
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29055&action=edit
Test Plan

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 53418] New OnDemandThreadGroup that creates threads when needed instead of creating them on Test startup

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53418

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #5 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Date: Fri Jul 13 21:49:30 2012
New Revision: 1361410

URL: http://svn.apache.org/viewvc?rev=1361410&view=rev
Log:
Bug 53418 - New OnDemandThreadGroup that creates threads when needed instead of
creating them on Test startup
Bugzilla Id: 53418

Added:
    jmeter/trunk/src/core/org/apache/jmeter/threads/OnDemandThreadGroup.java  
(with props)
   
jmeter/trunk/src/core/org/apache/jmeter/threads/gui/OnDemandThreadGroupGui.java
  (with props)
Modified:
    jmeter/trunk/src/core/org/apache/jmeter/engine/StandardJMeterEngine.java
    jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties
    jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties
    jmeter/trunk/src/core/org/apache/jmeter/threads/AbstractThreadGroup.java
    jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterThread.java
    jmeter/trunk/src/core/org/apache/jmeter/threads/ThreadGroup.java
    jmeter/trunk/xdocs/changes.xml


Date: Fri Jul 13 21:50:08 2012
New Revision: 1361411

URL: http://svn.apache.org/viewvc?rev=1361411&view=rev
Log:
Bug 53418 - New OnDemandThreadGroup that creates threads when needed instead of
creating them on Test startup
Documentation update
Bugzilla Id: 53418

Added:
    jmeter/trunk/docs/images/screenshots/ondemandthreadgroup.png   (with props)
    jmeter/trunk/xdocs/images/screenshots/ondemandthreadgroup.png   (with
props)
Modified:
    jmeter/trunk/xdocs/usermanual/component_reference.xml

-- 
You are receiving this mail because:
You are the assignee for the bug.