You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by vetalok <ve...@gmail.com> on 2006/09/13 15:24:14 UTC

How can I get the name of current Thread?

Hi
How can I get the name of current Thread?
I have a ThreadGroup that contains Beanshell Samplers. I need to get the
name of the current thread. Is there some feture to do it?
For example,
String currentThread = jmeter.getCurrentThreadName();
currentThread.equals("TheradGroup1-1");
Thanks


-- 
View this message in context: http://www.nabble.com/How-can-I-get-the-name-of-current-Thread--tf2265203.html#a6285533
Sent from the JMeter - User forum at Nabble.com.


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


Re: How can I get the name of current Thread?

Posted by vetalok <ve...@gmail.com>.
oh, sorry. The solution is  simply to write
Thread.currentThread().getName()
:)

-- 
View this message in context: http://www.nabble.com/How-can-I-get-the-name-of-current-Thread--tf2265203.html#a6286019
Sent from the JMeter - User forum at Nabble.com.


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