Configure interval between invocations?

Millies, Sebastian Sebastian.Millies at softwareag.com
Fri Jul 30 08:18:59 UTC 2021


Hello there,

I’m benchmarking code that internally sends requests to a bounded cached thread pool with a synchronous queue (immediate hand-off).

When the max pool size is below a certain threshold (and always when it is 1) I’m getting RejectedExecutionException, apparently because while JMH makes the next invocation in the current iteration after the code under test has returned from Futurue.get(), the executor service is still busy making the thread available again. Is there a way, perhaps by annotation, to “slow down” JMH in order to accommodate this situation?


  *   Sebastian

Software AG – Sitz/Registered office: Uhlandstraße 12, 64297 Darmstadt, Germany – Registergericht/Commercial register: Darmstadt HRB 1562 - Vorstand/Management Board: Sanjay Brahmawar (Vorsitzender/Chairman), Dr. Elke Frank, Dr. Matthias Heiden, Dr. Stefan Sigg - Aufsichtsratsvorsitzender/Chairman of the Supervisory Board: Karl-Heinz Streibich - http://www.softwareag.com


More information about the jmh-dev mailing list