Some ideas on making unique names: 1. use the ThreadGroup name, not "JMeterThread". Or both. 2. Number each thread in the ThreadGroup 1...N 3. Create a unique identifier number, based on current time stamp (in milliseconds), host ip, and a 128-bit random number.
Make a string from all these parts, example: "JMeterThread-Test Group 1-5-329832845092375487932479795893923" It's kinda big, but it has everything for everyone, splittable on "-" (or some other agreed upon char). If anyone knows an easier way, speak up. -Mike -----Original Message----- From: Martin Ramshaw [mailto:[EMAIL PROTECTED]] Sent: Friday, April 26, 2002 2:42 PM To: JMeter Developers Subject: RE: Thread Numbering (was Re: IRC) >I like it. I'd also like to add something that makes it unique even >across multiple runs, so that saved results from two different tests >can be combined (at a later time) without interference. What would be the best way to do this ? I was thinking that the threads might be named in the following way: Thread newThread = new Thread(threads[i]); newThread.setName("JMeterThread-" + (i + 1)); newThread.start(); How would you modify this ? BTW, naming the threads will turn out to be very useful if anyone ever has to run this stuff through a debugger (Forte always used to crash whenever I tried to debug threading). Note that *my* code increments the zero-based iterator as I don't tend to think in a zero-based way. Regards -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
