|
This is a reasonable request but will require a little more effort to introduce: we can't simply copy what the unit test setup does. In the case of the unit tests, all of the command line arguments are "ours", but in the case of the benchmark setup, several of the options are actually meaningful to the benchmark framework. Effectively, the current benchmark mainline doesn't need to know the difference or worry about overlap, since it just forwards everything to the benchmark side. If we want to start honoring additional mongodb specific flags, we will need to filter them out and act on them before invoking benchmark with a sanitized argv/argc. It does appear that all of the interesting flags that benchmark takes start with --benchmark_ (with the notable exception of --v). That may make filtering easier, if we just assume that 1) any flag starting with --benchmark_ should be tunneled to benchmark and no other, and that 2) all remaining flags are ours. Maybe something smart can be done with verbosity. In any event, this seems overall achievable with some thought and a bit of logic in the mainline.
|