Bug 36378 - [PATCH] A "Thread Watcher" Listener
Summary: [PATCH] A "Thread Watcher" Listener
Status: RESOLVED WONTFIX
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: Main (show other bugs)
Version: 2.0.3
Hardware: Other other
: P2 enhancement (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
: 37811 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-08-26 14:02 UTC by Patrick Onyeyiri
Modified: 2012-08-31 01:00 UTC (History)
1 user (show)



Attachments
Patch file (120.37 KB, text/plain)
2005-08-26 14:03 UTC, Patrick Onyeyiri
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Onyeyiri 2005-08-26 14:02:49 UTC
I was asked by somebody in the office to extend JMeter so that when running
tests, and threads stop (due to failure) to make a way to restart the thread. 
What I have done is to create a new Visualizer that lists all the running
threads, and allows you to right click on them in the list and stop/restart
them.  However, this required a few changes to the way JMeter works.  

1.    When the initial parsing of the test tree occurs, a new

traverser was added that passed an instance of the engine being used to all test
plan tree objects that are derived from AbstractVisualizer.

2.    AbstractVisualizer was extended to receive the engine instance.

3.    StandardJMeterEngine was extended to be able to restart threads,

and accept JMeterEngineMonitors.

4.    JMeterThread was extended to fire events to JMeterThreadMonitor

(which was also extended) to indicate when it started.

5.    A new class JMeterEngineMonitor was created to monitor when

engines create threads, when their threads are stopped, and when the test
starts/stops.

6.    New visualizer class ThreadWatcherVisualizer, and

ThreadWatcherTableDataModel were created for the GUI.

7.    messeages.properties was modified to add the extra strings for

the visualizer.


The visualizer is used by addeding it to the test plan, then when a test is
running, you can see/change the running status of all the threads.

When all threads are stopped - the test stops.  I have attached a patch file to
this email. 

- Nnamdi
Comment 1 Patrick Onyeyiri 2005-08-26 14:03:59 UTC
Created attachment 16210 [details]
Patch file
Comment 2 Sebb 2006-05-26 00:08:45 UTC
*** Bug 37811 has been marked as a duplicate of this bug. ***
Comment 3 Pascal Sancho 2010-03-30 09:18:11 UTC
Yannick said me privately that changing the Product entry was not what he wanted to do.
Comment 4 Ravi Gill 2012-07-18 10:51:04 UTC
Hi Guys,

This seems to be a great feature! and has been on the shelf for a while.

Any news on when then patch can be applies?

Cheers,

Ravi
Comment 5 Sebb 2012-08-31 01:00:14 UTC
As far as I can tell, the suggested feature only works for GUI mode.

Also, a thread only stops due to failure if the test plan is configured to do so; normally a thread will continue running until the test ends.

JMeter Thread Groups now support "Start Next Loop" on error.
Comment 6 The ASF infrastructure team 2022-09-24 20:37:35 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/1586