Skip to content

Less strict command line parsing #8

@andersmelander

Description

@andersmelander

Please make the command line parser less strict. The current validation makes custom command line params impossible since the library terminates the process if it encounters something it doesn't recognize (there's typo in the error message, btw):

benchmark/Spring.Benchmark.pas

Lines 1398 to 1399 in 7c4b8d9

WriteLine('error: unrecognozed command-line flag: ' + arg);
Halt(1);

For example, for use in profiling, I'd like to pass parameters that specify:

  1. The specific function being benchmarked.
    My benchmarks often iterate a binding registry and within each binding it iterates among several alternative implementations. For each implementation I then have a sequence of benchmarks to perform. The current filter functionality is unable to handle this.
  2. The number of iterations.
    Since I'm profiling, and later comparing different profile runs, I need the work performed to remain constant. Thus I set iterations to some value and naturally I'd like to then be able to change the number of iterations without having to recompile the benchmark application.

I'd prefer if it just printed a warning message on unhandled params - or you could add a new switch that made it simply ignore them: --benchmark_dont_bomb_on_unknown_flags.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions