1. 23 Apr, 2021 1 commit
    • [sysinfo] Fix CPU Frequency reading on AMD Ryzen CPU's (#1117) · c05843a9
      Roman Lebedev authored
      Currently, i get:
      ```
      Run on (32 X 7326.56 MHz CPU s)
      CPU Caches:
        L1 Data 32 KiB (x16)
        L1 Instruction 32 KiB (x16)
        L2 Unified 512 KiB (x16)
        L3 Unified 32768 KiB (x2)
      ```
      which seems mostly right, except that the frequency is rather bogus.
      Yes, i guess the CPU could theoretically achieve that,
      but i have 3.6GHz configured, and scaling disabled.
      So we clearly read the wrong thing.
      
      With this fix, i now get the expected
      ```
      Run on (32 X 3598.53 MHz CPU s)
      CPU Caches:
        L1 Data 32 KiB (x16)
        L1 Instruction 32 KiB (x16)
        L2 Unified 512 KiB (x16)
        L3 Unified 32768 KiB (x2)
      ```
  2. 20 Apr, 2021 1 commit
    • Use fewer ramp up repetitions when KeepRunningBatch is used (#1113) · 69054ae5
      Matt Armstrong authored
      Use the benchmark's reported iteration count when estimating
      iterations for the next repetition, rather than the requested
      iteration count.  When the benchmark uses KeepRunningBatch the actual
      iteration count can be larger than the one the runner requested.
      
      Prior to this fix the runner was underestimating the next iteration
      count, sometimes significantly so.  Consider the case of a benchmark
      using a batch size of 1024.  Prior to this change, the benchmark
      runner would attempt iteration counts 1, 10, 100 and 1000, yet the
      benchmark itself would do the same amount of work each time: a single
      batch of 1024 iterations.  The discrepancy could also contribute to
      estimation errors once the benchmark time reached 10% of the target.
      For example, if the very first batch of 1024 iterations reached 10% of
      benchmark_min_min time, the runner would attempt to scale that to 100%
      from a basis of one iteration rather than 1024.
      
      This bug was particularly noticeable in benchmarks with large batch
      sizes, especially when the benchmark also had slow set up or tear down
      phases.
      
      With this fix in place it is possible to use KeepRunningBatch to
      achieve a kind of "minimum iteration count" feature by using a larger
      fixed batch size.  For example, a benchmark may build a map of 500K
      elements and test a "find" operation.  There is no point in running
      "find" just 1, 10, 100, etc., times.  The benchmark can now pick a
      batch size of something like 10K, and the runner will arrive at the
      final max iteration count with in noticeably fewer repetitions.
  3. 19 Apr, 2021 2 commits
  4. 12 Apr, 2021 1 commit
  5. 09 Apr, 2021 4 commits
    • Shrink the tz_offset size to 41. (#1110) · 07578d82
      Chris Lalancette authored
      When building with gcc TSan on, and in Debug mode, we see a warning
      like:
      
      benchmark/src/timers.cc: In function ‘std::string benchmark::LocalDateTimeString()’:
      src/timers.cc:241:15: warning: ‘char* strncat(char*, const char*, size_t)’ output may be truncated copying 108 bytes from a string of length 127 [-Wstringop-truncation]
        241 |   std::strncat(storage, tz_offset, sizeof(storage) - timestamp_len - 1);
            |   ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
      While this is essentially a false positive (we never expect
      the number of bytes in tz_offset to be too large), the compiler can't
      actually tell that.  Shrink the size of tz_offset to a smaller, but still safe
      size to eliminate this warning.
      Signed-off-by: 's avatarChris Lalancette <clalancette@openrobotics.org>
    • fix minor typo · 5a77a6d8
      Dominic Hamon authored
    • fix minor typo · b8084e50
      Dominic Hamon authored
  6. 30 Mar, 2021 1 commit
    • Implement custom benchmark name (#1107) · 5e387e7d
      Tobias Schmidt authored
      * Implement custom benchmark name
      
      The benchmark's name can be changed using the Name() function
      which internally uses SetName().
      
      * Update AUTHORS and CONTRIBUTORS
      
      * Describe new feature in README
      
      * Move new name function up
      
      Fixes #1106
  7. 08 Mar, 2021 1 commit
  8. 05 Mar, 2021 2 commits
  9. 22 Feb, 2021 2 commits
  10. 14 Feb, 2021 1 commit
  11. 12 Feb, 2021 1 commit
  12. 05 Jan, 2021 1 commit
  13. 22 Dec, 2020 2 commits
  14. 21 Dec, 2020 1 commit
    • Add 'seconds' time unit (#1076) · 378ed8ff
      feserr authored
      Fixes #1075.
      
      * Add an option to report in seconds.
      
      * Reduce the time of the test.
      
      * Add CSV/JSON tests for new time reports.
  15. 26 Nov, 2020 2 commits
  16. 23 Nov, 2020 1 commit
  17. 19 Nov, 2020 1 commit
  18. 06 Nov, 2020 1 commit
  19. 03 Nov, 2020 1 commit
  20. 29 Oct, 2020 1 commit
  21. 21 Oct, 2020 1 commit
  22. 15 Oct, 2020 1 commit
  23. 12 Oct, 2020 1 commit
    • Add support for DragonFly BSD (#1058) · af72911f
      Michael Neumann authored
      Without this commit, compilation fails on DragonFly with the following message:
      
      ```
      /home/mneumann/Dev/benchmark.old/src/sysinfo.cc:446:2: error: #warning "HOST_NAME_MAX not defined. using 64" [-Werror=cpp]
      ^~~~~~~
      ```
      
      Also note that the sysctl is actually `hw.tsc_frequency` on DragonFly:
      
      ```
      $ sysctl hw.tsc_frequency
      hw.tsc_frequency: 3498984022
      ```
      
      Tested on:
      
      ```
      $ uname -a
      DragonFly box.localnet 5.9-DEVELOPMENT DragonFly v5.9.0.742.g4b29dd-DEVELOPMENT #5: Tue Aug 18 00:21:31 CEST 2020
      ```
  24. 29 Sep, 2020 1 commit
  25. 28 Sep, 2020 1 commit
  26. 21 Sep, 2020 1 commit
  27. 12 Sep, 2020 1 commit
  28. 11 Sep, 2020 1 commit
  29. 10 Sep, 2020 2 commits
  30. 09 Sep, 2020 1 commit
    • Create pylint.yml (#1039) · beb360d0
      Dominic Hamon authored
      * Create pylint.yml
      
      * improve file matching
      
      * fix some pylint issues
      
      * run on PR and push (force on master only)
      
      * more pylint fixes
      
      * suppress noisy exit code and filter to fatals
      
      * add conan as a dep so the module is importable
      
      * fix lint error on unreachable branch
  31. 03 Sep, 2020 1 commit