Skip to content
Snippets Groups Projects
  1. Feb 05, 2025
    • Carsten Gräser's avatar
      [cleanup] Remove old code in Dune::Timer · 5b13e205
      Carsten Gräser authored and Christoph Grüninger's avatar Christoph Grüninger committed
      `Dune::Timer` includes two alternative implementations
      for measuring time. Historically one was based on `getrusage()`
      and the other one on `std::clock()`. The former was the default
      and the latter could be enabled by defining a macro. Both in fact
      measured the time spend computing by the process.
      
      In `fa43f4bf` the default code path was changed from
      `getrusage()` to `std::chrono::high_resolution_clock::now()`
      while `std::clock()` could still be enabled by the macro.
      This was in fact a breaking change because the new default
      version measures the elapsed real time.
      
      This patch removed the non-default version based on `std::clock` because:
      
      * The breaking change happened almost 11 years so one can consider the
        new behavior the established 'correct' version.
      * The macro switch was neither documented nor tested.
      * Setting the macro manually in user code is error prone.
      * Both versions do completely different things leading to
        different measurements. It's not even clear that one
        produces larger numbers in general:
        `std::clock` adds up time spend computing in all threads of the
        process. Thus time in concurrent threads is added up, while
        the time a thread is sleeping is not counted.
      
      There a minor grain of salt: The documentation still documented
      the old behaviour and instead of 'fixing' the code this patch
      adjusts the documentation to established reality.
      5b13e205
  2. Feb 04, 2025
  3. Feb 03, 2025
  4. Jan 30, 2025
  5. Jan 23, 2025
  6. Jan 21, 2025
  7. Jan 18, 2025
  8. Jan 17, 2025
  9. Jan 16, 2025
  10. Jan 14, 2025
  11. Jan 13, 2025
  12. Jan 10, 2025
  13. Jan 09, 2025
  14. Dec 30, 2024
  15. Dec 29, 2024
  16. Dec 18, 2024
  17. Dec 16, 2024
  18. Dec 15, 2024
Loading