jmeter-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vladimir Sitnikov <>
Subject Re: Why do Functions that only have values as instance variable synchronize execute ?
Date Mon, 20 Oct 2014 20:55:52 GMT
Thank you for the kind words.

>I reviewed the patch, look OK for me, but why don't you also synchronize
>LogFunction2#execute since you do for LogFunction#execute ?

I should have put the reasoning why the synchronization is required.

It _is_ required in LogFunction to protect printDetails(System.out, s, t,
c); kind of calls.
LogFunction2 just delegates, thus there is no need to protect LogFunction2

If multiple threads execute LogFunction concurrently, the result will be
some garbage in the System.out.
I think it is better to have solid messages at cost of synchronization
rather than unreadable mix of multiple messages.

I guess we might move synchronization from LogFunction.execute to
LogFunction.logDetails to mitigate the contention (if any).

> Just to know, are you familiar with JMeter code or did you start looking
at it within this thread ?

I have some experience with the code base: I develop some plugins (timers,
csv readers, etc).
It was me who asked to create a git mirror a while ago:

This particular part (functions) is an easy starter. It is way much easier
than the controller-sampler flow.

Vladimir Sitnikov

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message