Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate nonius to provide more advanced benchmarking #1616

Merged
merged 3 commits into from
Jun 7, 2019
Merged

Integrate nonius to provide more advanced benchmarking #1616

merged 3 commits into from
Jun 7, 2019

Commits on Jun 6, 2019

  1. Integrate Nonius benchmark into Catch2

    Changes done to Nonius:
    * Moved things into "Catch::Benchmark" namespace
    * Benchmarks were integrated with `TEST_CASE`/`SECTION`/`GENERATE` macros
    * Removed Nonius's parameters for benchmarks, Generators should be used instead
    * Added relevant methods to the reporter interface (default-implemented, to avoid
    breaking existing 3rd party reporters)
    * Async processing is guarded with `_REENTRANT` macro for GCC/Clang, used by default
    on MSVC
    * Added a macro `CATCH_CONFIG_DISABLE_BENCHMARKING` that removes all traces of
    benchmarking from Catch
    fodinabor authored and horenmar committed Jun 6, 2019
    Configuration menu
    Copy the full SHA
    ce2560c View commit details
    Browse the repository at this point in the history
  2. Various improvements to the benchmarking support

    * Units from <ratio> are no longer redeclared in our own namespace
    * The default clock is `steady_clock`, not `high_resolution_clock`,
    because, as HH says "high_resolution_clock is useless. If you want
    measure the passing of time, use steady_clock. If you want user
    friendly time, use system_clock".
    * Benchmarking support is opt-in, not opt-out, to avoid the large
    (~10%) compile time penalty.
    * Benchmarking-related options in CLI are always present, to decrease
    the amount of code that is only compiled conditionally and making
    the whole shebang more maintainble.
    horenmar committed Jun 6, 2019
    Configuration menu
    Copy the full SHA
    e340ab8 View commit details
    Browse the repository at this point in the history
  3. Add an extra test for benchmarking macros

    Also updated baselines
    horenmar committed Jun 6, 2019
    Configuration menu
    Copy the full SHA
    10067a4 View commit details
    Browse the repository at this point in the history