RFR: Options rework
Aleksey Shipilev
aleksey.shipilev at oracle.com
Tue Aug 27 08:06:21 PDT 2013
Hi,
This is one of many changes towards the JMH API. This time, we revisit
our Options. At this point, we have very strong ties to arg4j to parse
the command line options. We also have two separate option versions, one
accepted by the host (harness) VM, and the second one by the forked VMs.
We translate the former to later for the forked runs, and that costs us
lots of scaffolding.
All this complicates the code significantly: making custom Options is
the error-prone and messy endeavor.
The cleanup is in this webrev:
http://cr.openjdk.java.net/~shade/jmh/options-rework-1.webrev/
High-level view:
- extracted Options interface; JMH core is now oblivious of the exact
Options implementation
- forked VM uses the binary link (already established for pulling the
data back from the forked VM) to pull the options from the host VM;
forked VM does not use any complex argument parsing anymore
- various API touchups
- sample API demo to demonstrate the OptionsBuilder
The normal use should not be affected, the changes are mostly
undercover. Please review!
Thanks,
-Aleksey.
More information about the jmh-dev
mailing list