1. 23 Oct, 2019 2 commits
  2. 08 Oct, 2019 1 commit
  3. 04 Oct, 2019 1 commit
  4. 27 Sep, 2019 1 commit
  5. 23 Sep, 2019 2 commits
    • Guard definition of __STDC_FORMAT_MACROS in ifndef (#875) · b874e722
      Geoffrey Martin-Noble authored
      This macro is sometimes already defined and redefining it results
      in build errors.
    • Define HOST_NAME_MAX for NaCl and RTEMS (#876) · 7411874d
      Geoffrey Martin-Noble authored
      These OS's don't always have HOST_NAME_MAX defined, resulting in
      build errors.
      
      A few related changes as well:
      * Only define HOST_NAME_MAX if it's not already defined. There are
        some cases where this is already defined, e.g. with NaCl if
        __USE_POSIX is set. To avoid all of these, only define it if it's
        not already defined.
      * Default HOST_NAME_MAX to 64 and issue a #warning. Having the wrong
        max length is pretty harmless. The name just ends up getting
        truncated and this is only for printing debug info. Because we're
        constructing a std::string from a char[] (so defined length), we
        don't need to worry about gethostname's undefined behavior for
        whether the truncation is null-terminated when the hostname
        doesn't fit in HOST_NAME_MAX. Of course, this doesn't help people
        who have -Werror set, since they'll still get a warning.
  6. 21 Sep, 2019 1 commit
  7. 20 Sep, 2019 1 commit
  8. 16 Sep, 2019 1 commit
    • Addresses issue #634. (#866) · bf4f2ea0
      sharpe5 authored
      * Update with instructions to build under Visual Studio
      
      Fixes Issue #634.
      
      I spent 3 days trying to build this library under Visual Studio 2017, only to discover on has to link to `Shlwapi.lib`.
      
      Became so frustrated with the docs that I added full build instructions for Visual Studio 2015, 2017 and Intel Comiler 2015 and 2019.
      
      * Update headings
  9. 15 Sep, 2019 1 commit
  10. 21 Aug, 2019 4 commits
  11. 12 Aug, 2019 1 commit
    • Custom user counters: add invert modifier. (#850) · 7d97a057
      Roman Lebedev authored
      While current counters can e.g. answer the question
      "how many items is processed per second", it is impossible to get
      it to tell "how many seconds it takes to process a single item".
      
      The solution is to add a yet another modifier `kInvert`,
      that is *always* considered last, which simply inverts the answer.
      
      Fixes #781, #830, #848.
  12. 07 Aug, 2019 1 commit
  13. 06 Aug, 2019 1 commit
  14. 30 Jul, 2019 1 commit
  15. 29 Jul, 2019 2 commits
  16. 27 Jul, 2019 1 commit
    • Bugfix/wsl selftest fixes. Fixes #839 (#843) · 32a1e397
      Eric Backus authored
      * Update AUTHORS and CONTRIBUTORS
      
      * Fix WSL self-test failures
      
      Some of the benchmark self-tests expect and check for a particular
      output format from the benchmark library. The numerical values must
      not be infinity or not-a-number, or the test will report an error.
      Some of the values are computed bytes-per-second or items-per-second
      values, so these require that the measured CPU time for the test to be
      non-zero. But the loop that is being measured was empty, so the
      measured CPU time for the loop was extremely small. On systems like
      Windows Subsystem for Linux (WSL) the timer doesn't have enough
      resolution to measure this, so the measured CPU time was zero.
      
      This fix just makes sure that these tests have something within the
      timing loop, so that the benchmark library will not decide that the
      loop takes zero CPU time. This makes these tests more robust, and in
      particular makes them pass on WSL.
  17. 22 Jul, 2019 1 commit
  18. 17 Jul, 2019 1 commit
  19. 05 Jul, 2019 1 commit
    • Add RISC-V support in cycleclock::Now (#833) · 4abdfbb8
      Sam Elliott authored
      The RISC-V implementation of `cycleclock::Now` uses the user-space
      `rdcycle` instruction to query how many cycles have happened since the
      core started.
      
      The only complexity here is on 32-bit RISC-V, where `rdcycle` can only
      read the lower 32 bits of the 64-bit hardware counter. In this case,
      `rdcycleh` reads the higher 32 bits of the counter. We match the powerpc
      implementation to detect and correct for overflow in the high bits.
  20. 26 Jun, 2019 1 commit
  21. 13 May, 2019 2 commits
    • Use IterationCount in one more place · 090faecb
      Roman Lebedev authored
      Found in -UNDEBUG build
    • Iteration counts should be `uint64_t` globally. (#817) · f92903cc
      Roman Lebedev authored
      This is a shameless rip-off of https://github.com/google/benchmark/pull/646
      I did promise to look into why that proposed PR was producing
      so much worse assembly, and so i finally did.
      
      The reason is - that diff changes `size_t` (unsigned) to `int64_t` (signed).
      
      There is this nice little `assert`:
      https://github.com/google/benchmark/blob/7a1c37028359ca9d386d719a6ad527743cf1b753/include/benchmark/benchmark.h#L744
      It ensures that we didn't magically decide to advance our iterator
      when we should have finished benchmarking.
      
      When `cached_` was unsigned, the `assert` was `cached_ UGT 0`.
      But we only ever get to that `assert` if `cached_ NE 0`,
      and naturally if `cached_` is not `0`, then it is bigger than `0`,
      so the `assert` is tautological, and gets folded away.
      
      But now that `cached_` became signed, the assert became `cached_ SGT 0`.
      And we still only know that `cached_ NE 0`, so the assert can't be
      optimized out, or at least it doesn't currently.
      
      Regardless of whether or not that is a bug in itself,
      that particular diff would have regressed the normal 64-bit systems,
      by halving the maximal iteration space (since we go from unsigned counter
      to signed one, of the same bit-width), which seems like a bug.
      And just so it happens, fixing *this* bug, fixes the other bug.
      
      This produces fully (bit-by-bit) identical state_assembly_test.s
      The filecheck change is actually needed regardless of this patch,
      else this test does not pass for me even without this diff.
  22. 11 May, 2019 1 commit
  23. 10 May, 2019 1 commit
  24. 09 May, 2019 1 commit
  25. 07 May, 2019 1 commit
  26. 01 May, 2019 3 commits
  27. 30 Apr, 2019 4 commits
  28. 25 Apr, 2019 1 commit
    • Improve README (#804) · 05d8c1c5
      astee authored
      * Update and organize README
      
      * Update AUTHORS and CONTRIBUTORS
      
      Fixes #803.