Forum Discussion

PeterT's avatar
PeterT
Occasional Contributor
17 years ago

Get Current Thread reference in Load Test

Hi,

Just wondering if there's a way to reference the currently executing Thread in a load test step?  I'm trying to write some log messages to a file while doing a LoadTest and I don't really want to wrestle with the hassle of multiple threads trying to write to the same file.  My solution was to create a separate log file for each executing Thread but am not sure how to figure out which Thread is currently executing.

If anyone has any ideas on that one or if a better method of logging details from a LoadTest that would be much appreciated.

Cheers

Peter

3 Replies

  • PeterT's avatar
    PeterT
    Occasional Contributor
    Nevermind, I found the context.ThreadIndex. Perhaps if I'd paid attention to the posting by nreimertz about the Source Forge boards being the main reference in the first place.......
  • Pete_H's avatar
    Pete_H
    Occasional Contributor
    Peter- Can you please provide us an example with how you did that?
  • Yeah Peter,

    I'm sorry, It is kind of a mess having two boards and we have to look into a solution for that. The optimal solution is not possible, so we have to look at which suboptimal solution to choose.

    /niclas