RFR: CODETOOLS-7903486: JMH: Revisit available jmh.executor options

Aleksey Shipilev shade at openjdk.org
Mon Jun 5 10:28:30 UTC 2023


On Fri, 2 Jun 2023 19:36:47 GMT, Sergey Kuksenko <skuksenko at openjdk.org> wrote:

> I agree. Using FJP_COMMON is dangerous, it's system-wide thread pool and its usage may give unpredictable behavior. Also, I agree that CACHED is useless. The current pair PLATFORM (was FIXED_TPE) and VIRTUAL and fine, 

Please put a formal review on this PR then?

> I just realized that it makes sense to note in a comment that both executors provide threads that live through the whole benchmark execution. (Especially that comment will be useful for VIRTUAL). Now I am thinking if expanding the set of PLATFORM/VIRTUAL executors may be useful. I am thinking about another pair platform/virtual when "Executors.newThreadPerTaskExecutor" is used. The pair will provide executors when every JMH iteration will use clean new threads.

Maybe, and that would require a bit more reflection magic, which is not a problem. I would suggest waiting until we integrate #107 before adding more executor types.

-------------

PR Comment: https://git.openjdk.org/jmh/pull/108#issuecomment-1576533609


More information about the jmh-dev mailing list